/* ============================================
   STYLE.CSS — Glassmorphism + Old-Age Minimal
   Modern frosted-glass UI on aged parchment
   ============================================ */

/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0D0B09;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

[data-theme="light"] .page-loader {
  background: #F5EDE0;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: #E8A849;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-text {
  font-family: 'Marck Script', cursive;
  font-size: 1.2rem;
  color: rgba(255, 245, 230, 0.4);
  letter-spacing: 0.06em;
}

[data-theme="light"] .loader-text {
  color: rgba(13, 11, 9, 0.35);
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

:root {
  /* Dark theme (default) — aged parchment night */
  --bg-primary: #0D0B09;
  --bg-secondary: #161210;
  --bg-glass: rgba(255, 245, 230, 0.04);
  --bg-glass-strong: rgba(255, 245, 230, 0.07);
  --bg-glass-hover: rgba(255, 245, 230, 0.09);
  --bg-glass-border: rgba(255, 245, 230, 0.08);
  --bg-glass-border-hover: rgba(255, 245, 230, 0.15);
  --text-primary: #E8DDD0;
  --text-secondary: #B8A994;
  --text-muted: #7A6E60;
  --text-faint: #4A4238;
  --accent: #E8A849;
  --accent-dim: rgba(232, 168, 73, 0.15);
  --accent-glow: rgba(232, 168, 73, 0.08);
  --accent-red: #D4654A;
  --accent-red-dim: rgba(212, 101, 74, 0.12);
  --accent-blue: #6B9BC3;
  --accent-blue-dim: rgba(107, 155, 195, 0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 60px rgba(232, 168, 73, 0.06);
  --blur: 20px;
  --blur-strong: 40px;

  --font-display: 'Playfair Display', serif;
  --font-heading: 'Old Standard TT', serif;
  --font-body: 'PT Serif', serif;
  --font-elegant: 'Cormorant Garamond', serif;

  --section-pad: 120px;
  --container-width: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme — warm parchment day */
[data-theme="light"] {
  --bg-primary: #F5EDE0;
  --bg-secondary: #EBE2D3;
  --bg-glass: rgba(255, 255, 255, 0.5);
  --bg-glass-strong: rgba(255, 255, 255, 0.65);
  --bg-glass-hover: rgba(255, 255, 255, 0.75);
  --bg-glass-border: rgba(0, 0, 0, 0.06);
  --bg-glass-border-hover: rgba(0, 0, 0, 0.1);
  --text-primary: #2C2416;
  --text-secondary: #5D4E37;
  --text-muted: #8A7B68;
  --text-faint: #B8AC9C;
  --accent: #C48A2A;
  --accent-dim: rgba(196, 138, 42, 0.1);
  --accent-glow: rgba(196, 138, 42, 0.06);
  --accent-red: #A84435;
  --accent-red-dim: rgba(168, 68, 53, 0.08);
  --accent-blue: #3B6E9C;
  --accent-blue-dim: rgba(59, 110, 156, 0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 60px rgba(196, 138, 42, 0.04);
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

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

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }
input { font-family: inherit; border: none; outline: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--bg-primary); }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ===== AMBIENT BACKGROUND ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.ambient-glow-1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(232,168,73,0.08) 0%, transparent 70%);
  animation: ambientFloat1 20s ease-in-out infinite;
}

.ambient-glow-2 {
  width: 500px; height: 500px;
  bottom: -200px; right: -100px;
  background: radial-gradient(circle, rgba(212,101,74,0.06) 0%, transparent 70%);
  animation: ambientFloat2 25s ease-in-out infinite;
}

.ambient-glow-3 {
  width: 400px; height: 400px;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232,168,73,0.04) 0%, transparent 70%);
  animation: ambientFloat3 30s ease-in-out infinite;
}

@keyframes ambientFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.2); }
}
@keyframes ambientFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -80px) scale(1.15); }
}
@keyframes ambientFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-40%, -60%) scale(1.3); }
}

[data-theme="light"] .ambient-glow { opacity: 0.7; }

/* Ember canvas */
#dust-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: top 0.3s ease;
}

.header-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}

.header-content {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-radius: var(--radius);
  border: 1px solid var(--bg-glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled .header-content {
  background: var(--bg-glass-strong);
  border-color: var(--bg-glass-border-hover);
  box-shadow: var(--shadow-md);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--accent);
  font-family: var(--font-display);
  transition: all 0.5s var(--ease);
}

.logo:hover .logo-icon {
  transform: rotate(360deg) scale(1.1);
  text-shadow: 0 0 20px var(--accent-glow);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

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

/* Desktop nav — hidden by default (shown at 768px) */
.header .nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text-primary);
  }
}

/* Header CTA (theme toggle) — hidden by default (shown at 768px) */
.header-cta {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-theme,
.btn-theme-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(232, 168, 73, 0.2);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn-theme:hover {
    background: rgba(232, 168, 73, 0.2);
    border-color: rgba(232, 168, 73, 0.4);
  }
}

.btn-theme .theme-icon-light,
.btn-theme .theme-icon-dark,
.btn-theme-mobile .theme-icon-light,
.btn-theme-mobile .theme-icon-dark {
  font-size: 0.85rem;
  line-height: 1;
}

.btn-theme .theme-icon-dark,
.btn-theme-mobile .theme-icon-dark { display: none; }

[data-theme="light"] .btn-theme .theme-icon-light,
[data-theme="light"] .btn-theme-mobile .theme-icon-light { display: none; }
[data-theme="light"] .btn-theme .theme-icon-dark,
[data-theme="light"] .btn-theme-mobile .theme-icon-dark { display: inline; }

/* Mobile toggle — visible by default (hidden at 768px) */
.mobile-toggle {
  display: block;
  padding: 8px;
  background: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .mobile-toggle:hover {
    color: var(--text-primary);
  }
}

.mobile-toggle svg {
  width: 22px; height: 22px;
  display: block;
}

/* Mobile menu dropdown */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
  border-top: 1px solid var(--bg-glass-border);
  padding: 0 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition:
    max-height 0.35s ease,
    opacity 0.2s ease,
    transform 0.35s ease,
    padding 0.35s ease,
    visibility 0s linear 0.35s;
}

.mobile-menu.active {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  padding: 16px;
  transition:
    max-height 0.35s ease,
    opacity 0.2s ease,
    transform 0.35s ease,
    padding 0.35s ease;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu .nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-menu .nav-link::after { display: none; }

.mobile-menu .nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .mobile-menu .nav-link:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
  }
}

.mobile-menu .btn-theme-mobile {
  margin-top: 8px;
}

.btn-theme-mobile {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: 100px;
  backdrop-filter: blur(var(--blur));
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s 0.3s forwards;
}

.hero-title {
  font-family: 'Marck Script', cursive;
  font-size: 6.5rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-word {
  display: inline-block;
  white-space: nowrap;
}

.hero-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 20px;
  opacity: 0;
  animation: lineExpand 0.8s 1.2s var(--ease) forwards;
}

@keyframes lineExpand {
  from { width: 0; opacity: 0; }
  to { width: 60px; opacity: 1; }
}

.hero-subtitle {
  font-family: var(--font-elegant);
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.8s 1.5s forwards;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: all 0.4s var(--ease);
  opacity: 0;
  animation: fadeInUp 0.8s 1.8s forwards;
  box-shadow: 0 4px 20px rgba(232, 168, 73, 0.25);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 168, 73, 0.35);
}

.hero-btn svg {
  transition: transform 0.3s ease;
}

.hero-btn:hover svg {
  transform: translateX(4px);
}

/* Hero stats — inline text with dots */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s 2.1s forwards;
}

.hero-stat {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.hero-stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

/* ===== HERO DECORATIONS ===== */
.hero-decorations {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Ink blots */
.hero-ink-blot {
  position: absolute;
  color: var(--accent);
  opacity: 0;
  animation: inkBlotIn 1.5s ease forwards;
}

.hero-ink-blot-1 {
  width: 180px;
  height: 180px;
  top: 8%;
  left: -2%;
  opacity: 0.04;
  animation-delay: 0.5s;
  transform: rotate(-15deg);
}

.hero-ink-blot-2 {
  width: 140px;
  height: 140px;
  bottom: 12%;
  right: 2%;
  opacity: 0.035;
  animation-delay: 0.8s;
  transform: rotate(25deg);
}

@keyframes inkBlotIn {
  0% { opacity: 0; transform: scale(0.3) rotate(var(--ink-rotate, 0deg)); }
  60% { opacity: 0.06; transform: scale(1.1) rotate(var(--ink-rotate, 0deg)); }
  100% { opacity: var(--ink-opacity, 0.04); transform: scale(1) rotate(var(--ink-rotate, 0deg)); }
}

.hero-ink-blot-1 { --ink-rotate: -15deg; --ink-opacity: 0.04; }
.hero-ink-blot-2 { --ink-rotate: 25deg; --ink-opacity: 0.035; }

/* Quill */
.hero-quill {
  position: absolute;
  width: 80px;
  height: 200px;
  right: 10%;
  top: 15%;
  color: var(--accent);
  opacity: 0;
  transform: rotate(25deg);
  animation: quillIn 1.2s 0.4s ease forwards, quillFloat 6s 2s ease-in-out infinite;
}

@keyframes quillIn {
  from { opacity: 0; transform: rotate(25deg) translateY(-30px); }
  to { opacity: 0.25; transform: rotate(25deg) translateY(0); }
}

@keyframes quillFloat {
  0%, 100% { transform: rotate(25deg) translateY(0); }
  50% { transform: rotate(27deg) translateY(-8px); }
}

/* Ink drops */
.hero-ink-drop {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
}

.hero-ink-drop-1 {
  width: 6px;
  height: 6px;
  right: 12%;
  top: 65%;
  opacity: 0;
  animation: inkDropFall 2s 1.5s ease forwards;
}

.hero-ink-drop-2 {
  width: 4px;
  height: 4px;
  right: 13.5%;
  top: 68%;
  opacity: 0;
  animation: inkDropFall 2s 2s ease forwards;
}

.hero-ink-drop-3 {
  width: 3px;
  height: 3px;
  right: 11%;
  top: 70%;
  opacity: 0;
  animation: inkDropFall 2s 2.5s ease forwards;
}

@keyframes inkDropFall {
  0% { opacity: 0; transform: translateY(-10px) scale(0.5); }
  30% { opacity: 0.3; transform: translateY(0) scale(1); }
  100% { opacity: 0.15; transform: translateY(0) scale(1); }
}

/* Floating Cyrillic letters */
.hero-float-letter {
  position: absolute;
  font-family: 'Old Standard TT', serif;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  user-select: none;
}

.hero-fl-1 {
  font-size: 3.5rem;
  top: 12%;
  left: 8%;
  animation: floatLetterIn 1s 0.3s ease forwards, floatLetter 8s 1.5s ease-in-out infinite;
  --float-x: 5px;
  --float-y: -10px;
}

.hero-fl-2 {
  font-size: 2.8rem;
  top: 25%;
  right: 15%;
  animation: floatLetterIn 1s 0.6s ease forwards, floatLetter 9s 2s ease-in-out infinite;
  --float-x: -8px;
  --float-y: 6px;
}

.hero-fl-3 {
  font-size: 4rem;
  bottom: 20%;
  left: 5%;
  animation: floatLetterIn 1s 0.9s ease forwards, floatLetter 7s 2.2s ease-in-out infinite;
  --float-x: 8px;
  --float-y: -5px;
}

.hero-fl-4 {
  font-size: 2.5rem;
  bottom: 30%;
  right: 6%;
  animation: floatLetterIn 1s 1.2s ease forwards, floatLetter 10s 2.5s ease-in-out infinite;
  --float-x: -5px;
  --float-y: 8px;
}

.hero-fl-5 {
  font-size: 3rem;
  top: 60%;
  left: 15%;
  animation: floatLetterIn 1s 1.5s ease forwards, floatLetter 8.5s 2.8s ease-in-out infinite;
  --float-x: 6px;
  --float-y: -7px;
}

@keyframes floatLetterIn {
  from { opacity: 0; filter: blur(6px); transform: scale(0.7); }
  to { opacity: 0.06; filter: blur(0); transform: scale(1); }
}

@keyframes floatLetter {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(var(--float-x), var(--float-y)); }
  75% { transform: translate(calc(var(--float-x) * -0.5), calc(var(--float-y) * -0.5)); }
}

/* Book pages */
.hero-book-page {
  position: absolute;
  border: 1px solid var(--accent);
  border-radius: 2px;
  opacity: 0;
}

.hero-book-page-1 {
  width: 60px;
  height: 80px;
  bottom: 15%;
  left: 12%;
  transform: rotate(-8deg);
  animation: bookPageIn 1s 1s ease forwards, bookPageFloat 7s 2.5s ease-in-out infinite;
}

.hero-book-page-2 {
  width: 50px;
  height: 68px;
  bottom: 18%;
  left: 14%;
  transform: rotate(4deg);
  animation: bookPageIn 1s 1.3s ease forwards, bookPageFloat 8s 3s ease-in-out infinite;
}

@keyframes bookPageIn {
  from { opacity: 0; transform: rotate(var(--page-rotate, -8deg)) translateY(15px); }
  to { opacity: 0.06; transform: rotate(var(--page-rotate, -8deg)) translateY(0); }
}

.hero-book-page-1 { --page-rotate: -8deg; }
.hero-book-page-2 { --page-rotate: 4deg; }

@keyframes bookPageFloat {
  0%, 100% { transform: rotate(var(--page-rotate, 0deg)) translateY(0); }
  50% { transform: rotate(var(--page-rotate, 0deg)) translateY(-6px); }
}

/* ===== SECTION COMMON ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.section-subtitle {
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===== CATEGORIES ===== */
.categories {
  padding: 72px 0 80px;
  position: relative;
  z-index: 2;
}

.categories .section-header {
  margin-bottom: 36px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Desktop: card layout */
.category-item {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}

.category-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.category-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--bg-glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.category-item:hover::before { opacity: 1; }

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
  position: relative;
  transition: transform 0.5s var(--ease);
}

.category-item:hover .category-icon {
  transform: scale(1.1);
}

.category-info {
  position: relative;
}

.category-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: block;
}

.category-desc {
  font-family: var(--font-elegant);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
  display: block;
}

.category-count {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ===== DICTIONARY ===== */
.dictionary {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 2;
}

.dict-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(var(--blur));
}

.dict-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass-strong);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
}

.dict-search {
  position: relative;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.no-results {
  text-align: center;
  padding: 80px 20px;
  font-family: var(--font-elegant);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.page-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.page-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.page-arrow {
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.page-dots {
  min-width: 28px;
  border: none;
  background: none;
  backdrop-filter: none;
  color: var(--text-faint);
  pointer-events: none;
}

.page-info {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.page-current {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 12px;
}

/* ===== QUOTES ===== */
.quotes-section {
  padding: 72px 0 80px;
  position: relative;
  z-index: 2;
}

.quotes-section .section-header {
  margin-bottom: 36px;
}

.quotes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quote-card {
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius);
  padding: 24px 28px 20px;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}

.quote-card::before {
  content: '\00AB';
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  pointer-events: none;
}

.quote-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--bg-glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quote-text {
  font-family: var(--font-elegant);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 12px;
  flex: 1;
}

.quote-text em {
  color: var(--accent-red);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-red-dim);
  text-underline-offset: 3px;
}

.quote-source {
  font-size: 0.75rem;
  color: var(--text-faint);
  padding-top: 10px;
  border-top: 1px solid var(--bg-glass-border);
}

.quote-source::before { content: '\2014\00a0'; }

/* Last card spans full width if odd count */
.quote-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 600px;
  justify-self: center;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--bg-glass-border);
  position: relative;
  z-index: 2;
}

.footer-inner {
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--bg-glass-border);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.footer-credit {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.footer-credit a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ===== UTILITY ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CYRILLIC EASTER EGG ===== */
.cyrillic-mode .section-title,
.cyrillic-mode .hero-title {
  letter-spacing: 0.1em;
}
