/* ═══════════════════════════════════════════════════════════
   uRead v3.0 — Beautified Modern Card Design System
   ═══════════════════════════════════════════════════════════ */

:root {
  --max-w: 1280px;
  --content-w: 760px;
  --nav-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --tr-fast: 0.15s ease;
  --tr-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --shadow-1: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-2: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-3: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.08);
  --shadow-4: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-5: 0 25px 50px rgba(0,0,0,0.15), 0 12px 24px rgba(0,0,0,0.1);
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #4f46e5 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

:root {
  --bg-primary: #08080d;
  --bg-secondary: #0f0f18;
  --bg-tertiary: #161625;
  --bg-elevated: #1e1e32;
  --surface: #12121f;
  --surface-hover: #1a1a2e;
  --surface-active: #222240;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #f4f4f8;
  --text-secondary: #9ca3b8;
  --text-tertiary: #5f6580;
  --text-inverse: #08080d;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-subtle: rgba(139,92,246,0.1);
  --accent-glow: rgba(139,92,246,0.25);
  --success: #10b981;
  --success-subtle: rgba(16,185,129,0.1);
  --warning: #f59e0b;
  --warning-subtle: rgba(245,158,11,0.1);
  --danger: #ef4444;
  --danger-subtle: rgba(239,68,68,0.1);
  --info: #3b82f6;
  --info-subtle: rgba(59,130,246,0.1);
  --pink: #ec4899;
  --pink-subtle: rgba(236,72,153,0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--tr-fast); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: white; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION — Glass morphism with smooth transitions
   ═══════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(8, 8, 13, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all var(--tr-normal);
}

.nav.scrolled {
  background: rgba(8, 8, 13, 0.92);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border-bottom-color: var(--border-hover);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: opacity var(--tr-fast);
}

.nav-brand:hover { opacity: 0.85; }

.nav-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-brand-icon svg {
  width: 100%;
  height: 100%;
}

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 600;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--tr-fast);
  margin-left: 8px;
  font-family: inherit;
}

.nav-search-btn:hover {
  border-color: var(--accent);
  color: var(--text-secondary);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.nav-search-btn kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background var(--tr-fast);
}

.nav-burger:hover { background: var(--surface-hover); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

.main {
  width: min(var(--max-w), calc(100% - 3rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION — Gradient mesh background
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: 3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(139,92,246,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(59,130,246,0.12), transparent),
    radial-gradient(ellipse 50% 30% at 60% 80%, rgba(236,72,153,0.08), transparent),
    radial-gradient(ellipse 40% 25% at 10% 90%, rgba(16,185,129,0.06), transparent);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.4), transparent);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-subtle);
  border: 1px solid rgba(139,92,246,0.15);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--accent-glow);
}

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

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════ */

.search-container {
  position: relative;
  max-width: 520px;
  margin-top: 2rem;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--tr-fast);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 4px 16px rgba(139,92,246,0.1);
}

.search-input::placeholder { color: var(--text-tertiary); }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--tr-fast);
}

.search-input:focus ~ .search-icon { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   STATS — Animated cards with gradient borders
   ═══════════════════════════════════════════════════════════ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 3rem;
}

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all var(--tr-normal);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--tr-fast);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--accent);
  transition: all var(--tr-fast);
}

.stat-card:hover .stat-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.05);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  transition: all var(--tr-fast);
}

.section-link:hover {
  background: var(--accent);
  color: white;
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY TABS — Pill style with smooth transitions
   ═══════════════════════════════════════════════════════════ */

.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
  padding: 6px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--tr-fast);
  white-space: nowrap;
  border: none;
  background: none;
  font-family: inherit;
  position: relative;
}

.category-tab:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

/* ═══════════════════════════════════════════════════════════
   CARDS GRID — Beautiful hover effects
   ═══════════════════════════════════════════════════════════ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--tr-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--tr-fast);
}

.card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: radial-gradient(circle at top right, var(--accent-subtle), transparent 70%);
  opacity: 0;
  transition: opacity var(--tr-slow);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-4);
}

.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.card-category.literature { background: var(--pink-subtle); color: var(--pink); }
.card-category.skills { background: var(--info-subtle); color: var(--info); }
.card-category.growth { background: var(--success-subtle); color: var(--success); }
.card-category.history { background: var(--warning-subtle); color: var(--warning); }
.card-category.tech { background: var(--accent-subtle); color: var(--accent); }
.card-category.finance { background: rgba(34,197,94,0.1); color: #22c55e; }
.card-category.biography { background: var(--pink-subtle); color: var(--pink); }
.card-category.art { background: rgba(168,85,247,0.1); color: #a855f7; }
.card-category.philosophy { background: rgba(99,102,241,0.1); color: #6366f1; }

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

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

.card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  flex: 1;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.card-author {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-author-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.card-rating {
  display: flex;
  gap: 2px;
  color: var(--warning);
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 3rem;
}

.page-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--tr-fast);
  font-family: inherit;
}

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

.page-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   NOTE DETAIL PAGE — Beautiful reading experience
   ═══════════════════════════════════════════════════════════ */

.note-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.note-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  padding-bottom: 2rem;
}

.note-content { max-width: var(--content-w); min-width: 0; }

.reading-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  height: 3px;
  background: var(--bg-tertiary);
  z-index: 999;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

.note-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.note-article::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.note-article::after {
  content: '';
  position: absolute;
  top: 3px; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle at top right, var(--accent-subtle), transparent 70%);
  pointer-events: none;
}

.note-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.note-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(139,92,246,0.15);
}

.note-article h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.note-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.2rem;
}

.note-tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all var(--tr-fast);
  cursor: pointer;
}

.note-tag:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   NOTE CONTENT STYLES
   ═══════════════════════════════════════════════════════════ */

.note-body {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.note-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
  position: relative;
}

.note-body h2::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.note-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.8rem;
  letter-spacing: -0.01em;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.note-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.6rem;
}

.note-body p { margin-bottom: 1.2rem; }
.note-body strong { color: var(--text-primary); font-weight: 600; }

.note-body ul, .note-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.note-body li { margin-bottom: 0.5rem; }

.note-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.note-body code {
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}

.note-body pre {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.note-body pre code { background: none; padding: 0; color: var(--text-secondary); }

.note-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.note-body th, .note-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.note-body th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.note-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 2rem 0;
}

.note-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   TOC — Clean and minimal
   ═══════════════════════════════════════════════════════════ */

.toc {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-title::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--tr-fast);
  border-left: 2px solid transparent;
  line-height: 1.5;
  margin-bottom: 2px;
}

.toc-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   AGENT SECTION
   ═══════════════════════════════════════════════════════════ */

.agent-section {
  margin-top: 2.5rem;
  padding: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.agent-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-cool);
}

.agent-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.agent-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.agent-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.agent-subtitle { font-size: 0.78rem; color: var(--text-tertiary); }

.agent-copy-row { display: flex; gap: 10px; align-items: center; }

.agent-url {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-copy-btn {
  padding: 10px 20px;
  background: var(--gradient-cool);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--tr-fast);
  font-family: inherit;
  white-space: nowrap;
}

.agent-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(6,182,212,0.3);
}

/* ═══════════════════════════════════════════════════════════
   RELATED NOTES
   ═══════════════════════════════════════════════════════════ */

.related-section { margin-top: 3rem; }
.related-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-section h3::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.related-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--tr-fast);
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.related-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.related-card p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   TAG CLOUD
   ═══════════════════════════════════════════════════════════ */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.tag-cloud-item {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.tag-cloud-item:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.tag-cloud-item[data-count="high"] {
  background: var(--accent-subtle);
  border-color: rgba(139,92,246,0.2);
  color: var(--accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   GRAPH PAGE
   ═══════════════════════════════════════════════════════════ */

.graph-container {
  width: 100%;
  height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.graph-container svg { width: 100%; height: 100%; }

/* ═══════════════════════════════════════════════════════════
   STATS PAGE
   ═══════════════════════════════════════════════════════════ */

.stats-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.stats-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.stats-chart-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.chart-placeholder { height: 250px; display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); font-size: 0.85rem; }

/* ═══════════════════════════════════════════════════════════
   CURATED LISTS
   ═══════════════════════════════════════════════════════════ */

.list-section { margin-bottom: 3rem; }

.list-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.list-section-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }

.list-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: all var(--tr-fast);
}

.list-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-1);
}

.list-item-number {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.list-item-content h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.list-item-content p { font-size: 0.82rem; color: var(--text-tertiary); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 3rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.footer-inner { max-width: 600px; margin: 0 auto; padding: 0 1rem; }

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-brand-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.footer-brand-icon svg { width: 100%; height: 100%; }

.footer-tagline { font-size: 0.88rem; color: var(--text-tertiary); margin-bottom: 16px; line-height: 1.6; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.footer-links a { color: var(--text-tertiary); transition: color var(--tr-fast); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--text-tertiary); opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════
   SEARCH MODAL — Beautiful overlay
   ═══════════════════════════════════════════════════════════ */

.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal-overlay.active { display: flex; }

.search-modal {
  width: min(600px, calc(100% - 2rem));
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-5);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-input {
  width: 100%;
  padding: 18px 20px 18px 52px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  outline: none;
}

.search-modal-input::placeholder { color: var(--text-tertiary); }

.search-modal-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

.search-modal-results { max-height: 400px; overflow-y: auto; }

.search-modal-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--tr-fast);
}

.search-modal-item:hover { background: var(--surface-hover); }
.search-modal-item-title { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 4px; }
.search-modal-item-meta { font-size: 0.78rem; color: var(--text-tertiary); }

.search-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.search-modal-footer kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — PC optimized
   ═══════════════════════════════════════════════════════════ */

/* Large desktop */
@media (min-width: 1280px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .stats { gap: 20px; }
}

/* Tablet */
@media (max-width: 1024px) {
  .note-layout { grid-template-columns: 1fr; gap: 24px; }
  .note-sidebar { display: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-search-btn { display: none; }

  .main {
    width: 100%;
    padding: calc(var(--nav-h) + 1rem) 0 6rem;
  }

  .main > * { padding-left: 1rem; padding-right: 1rem; }

  .hero {
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-xl);
    margin-left: 0;
    margin-right: 0;
  }

  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.6rem; }
  .stat-icon { width: 36px; height: 36px; margin-bottom: 10px; }

  .cards-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 18px; }

  .note-article {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .agent-copy-row { flex-direction: column; }
  .agent-url { width: 100%; }

  .category-tabs { gap: 4px; padding: 4px; }
  .category-tab { padding: 8px 12px; font-size: 0.78rem; }

  .footer-links { flex-direction: column; gap: 8px; }

  .related-grid { grid-template-columns: 1fr; }
  .stats-page-grid { grid-template-columns: 1fr; }

  /* Mobile bottom nav */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 8, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--tr-fast);
    min-width: 56px;
  }

  .mobile-nav-item.active { color: var(--accent); }
  .mobile-nav-item svg { width: 22px; height: 22px; }
}

/* Mobile nav hidden by default on desktop */
.mobile-nav { display: none; }

/* Small mobile */
@media (max-width: 480px) {
  .hero { padding: 2rem 1.2rem; }
  .hero h1 { font-size: 1.5rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .note-article h1 { font-size: 1.4rem; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.68rem; }
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

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

.fade-in { animation: fadeIn 0.4s ease-out both; }
.fade-in-delay-1 { animation-delay: 0.05s; }
.fade-in-delay-2 { animation-delay: 0.1s; }
.fade-in-delay-3 { animation-delay: 0.15s; }
.fade-in-delay-4 { animation-delay: 0.2s; }

/* ═══════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════ */

@media print {
  .nav, .footer, .agent-section, .reading-progress, .search-modal-overlay, .mobile-nav { display: none !important; }
  .main { padding-top: 0; }
  .note-article { box-shadow: none; border: 1px solid #ddd; }
  body { background: white; color: black; }
}
