:root {
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-code: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;

  --bg: #faf8f5;
  --bg-alt: #f5f0eb;
  --surface: #ffffff;
  --surface-hover: #faf8f5;
  --text: #1c1917;
  --text-soft: #57534e;
  --text-muted: #a8a29e;
  --primary: #7c3aed;
  --primary-dark: #4c1d95;
  --primary-light: #a78bfa;
  --primary-glow: rgba(124, 58, 237, 0.08);
  --gold: #b8860b;
  --gold-light: #f5d78e;
  --gold-glow: rgba(184, 134, 11, 0.1);
  --border: #e7e5e4;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.05);
  --shadow-md: 0 4px 16px rgba(28,25,23,0.06);
  --shadow-lg: 0 12px 40px rgba(28,25,23,0.08);
  --radius: 8px;
  --radius-lg: 16px;
  --header-bg: rgba(255,255,255,0.88);
  --max-w: 1120px;
  --max-w-narrow: 720px;
  --header-h: 64px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark {
  --bg: #1c1917;
  --bg-alt: #292524;
  --surface: #292524;
  --surface-hover: #33302e;
  --text: #f5f5f4;
  --text-soft: #a8a29e;
  --text-muted: #78716c;
  --border: #3f3d3b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --header-bg: rgba(41,37,36,0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
@supports (padding: env(safe-area-inset-top)) {
  :root { --sat: env(safe-area-inset-top); --sar: env(safe-area-inset-right); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); }
}
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: hidden; overflow-wrap: break-word; }
::selection { background: var(--primary); color: #fff; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  padding-top: var(--sat, 0); padding-left: var(--sal, 0); padding-right: var(--sar, 0);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1.5rem;
}
.logo { flex-shrink: 0; }
.logo h1 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4c1d95, #7c3aed, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo .tagline {
  font-size: 0.65rem; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  -webkit-text-fill-color: var(--text-muted);
  margin-top: -2px;
}
.header-right {
  display: flex; align-items: center; gap: 0.75rem;
  flex: 1; justify-content: flex-end;
}

/* Theme Toggle */
.theme-toggle {
  background: none; border: none; color: var(--text-muted);
  font-size: 1rem; cursor: pointer; padding: 0.4rem;
  border-radius: 8px; transition: var(--transition);
  display: flex; align-items: center;
}
.theme-toggle:hover { color: var(--gold); background: var(--gold-glow); }

/* Header Search */
.header-search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.3rem 0.75rem;
  transition: var(--transition); max-width: 220px; width: 100%;
}
.header-search:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow);
}
.header-search-icon { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }
.header-search-input {
  border: none; outline: none; background: transparent;
  font-size: 0.8rem; font-family: var(--font-body); color: var(--text);
  width: 100%;
}
.header-search-input::placeholder { color: var(--text-muted); }
.header-search-kbd {
  font-size: 0.6rem; color: var(--text-muted); background: var(--border);
  padding: 0.05rem 0.3rem; border-radius: 4px;
  font-family: inherit; flex-shrink: 0;
  display: none;
}
@media (min-width: 900px) { .header-search-kbd { display: block; } }

/* Navigation */
.main-nav { display: flex; gap: 0.15rem; align-items: center; }
.main-nav a {
  font-size: 0.78rem; font-weight: 500;
  color: var(--text-soft); padding: 0.35rem 0.6rem;
  border-radius: 6px; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.3rem;
  white-space: nowrap;
}
.main-nav a i { font-size: 0.7rem; opacity: 0.5; }
.main-nav a:hover { color: var(--primary); background: var(--primary-glow); }

/* Mobile Nav Trigger & Overlay */
.nav-trigger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.3rem; cursor: pointer;
  padding: 0.4rem; z-index: 110;
  -webkit-tap-highlight-color: transparent;
}
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 105;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.nav-overlay.active { opacity: 1; }
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 106;
  width: min(300px, 80vw); background: var(--surface);
  padding: calc(var(--header-h) + var(--sat, 0px)) 1.5rem calc(2rem + var(--sab, 0px));
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.nav-drawer.active { transform: translateX(0); }
.nav-drawer a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.75rem; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 500; color: var(--text);
  transition: var(--transition); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer a:hover { background: var(--primary-glow); color: var(--primary); }
.nav-drawer a i { width: 1.2rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.nav-drawer a.nav-tests-link { background: var(--primary-glow); border-radius: var(--radius); }
.nav-drawer a.nav-tests-link i { color: var(--primary); }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 0.65rem; font-weight: 700;
  min-width: 1.25rem; height: 1.25rem; border-radius: 10px;
  padding: 0 0.3rem; margin-left: auto;
}
body.nav-open { overflow: hidden; }

/* ============ HERO ============ */
.hero {
  text-align: center; padding: 5rem 0 3.5rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-bg .orb {
  position: absolute; border-radius: 50%;
  animation: heroOrb 8s ease-in-out infinite alternate;
}
.hero-bg .orb:nth-child(1) {
  width: 600px; height: 600px; top: -250px; left: -150px;
  background: radial-gradient(circle, rgba(124,58,237,0.08), transparent 70%);
  animation-delay: 0s;
}
.hero-bg .orb:nth-child(2) {
  width: 450px; height: 450px; bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(184,134,11,0.06), transparent 70%);
  animation-delay: -3s;
}
.hero-bg .orb:nth-child(3) {
  width: 300px; height: 300px; top: 10%; left: 60%;
  background: radial-gradient(circle, rgba(124,58,237,0.05), transparent 70%);
  animation-delay: -6s;
}
@keyframes heroOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

.hero-icon {
  font-size: 2.2rem; color: var(--primary-light);
  margin-bottom: 1.25rem; display: block;
  animation: heroFloat 3s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h2 {
  font-family: var(--font-display);
  font-size: 3.2rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 1rem; position: relative; z-index: 1;
  color: var(--text);
}
.hero h2 .highlight {
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-family: var(--font-body);
  font-size: 1.05rem; color: var(--text-soft);
  max-width: 580px; margin: 0 auto; line-height: 1.7;
  position: relative; z-index: 1;
  font-weight: 400;
}

/* Hero Search */
.hero-search {
  display: flex; align-items: center; gap: 0.75rem;
  max-width: 480px; margin: 1.75rem auto 0;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0.7rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition); position: relative; z-index: 1;
  cursor: text;
}
.hero-search:focus-within {
  border-color: var(--primary); box-shadow: 0 4px 24px rgba(124,58,237,0.1);
}
.hero-search-icon { color: var(--primary-light); font-size: 0.9rem; }
.hero-search-input {
  border: none; outline: none; background: transparent;
  font-size: 0.9rem; font-family: var(--font-body); font-weight: 500;
  color: var(--text); width: 100%;
}
.hero-search-input::placeholder { color: var(--text-muted); font-weight: 400; }

/* Hero Stats */
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem; margin-top: 2.25rem;
  position: relative; z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 1.6rem; font-weight: 700; color: var(--primary-dark);
  display: block; line-height: 1.1; font-family: var(--font-display);
}
.hero-stat .label {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem;
  display: flex; align-items: center; gap: 0.3rem; justify-content: center;
}
.hero-stat .label i { font-size: 0.65rem; }

/* ============ DECORATIVE DIVIDER ============ */
.section-divider {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem; color: var(--text-muted);
}
.section-divider::before,
.section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section-divider i { font-size: 0.8rem; opacity: 0.5; }

/* ============ SECTION TITLE ============ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.6rem;
  letter-spacing: -0.01em;
}
.section-title i { color: var(--gold); font-size: 0.9rem; opacity: 0.8; }

/* ============ AUTHOR SPOTLIGHT ============ */
.author-spotlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
  border-radius: var(--radius-lg); padding: 2.5rem; margin-bottom: 3rem;
  text-align: center; position: relative; overflow: hidden;
  border: 1px solid rgba(184,134,11,0.12);
}
.author-spotlight::before {
  content: '✦'; position: absolute; top: -10px; right: 10px;
  font-size: 8rem; color: rgba(184,134,11,0.1); line-height: 1;
  font-family: serif;
}
.author-spotlight h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; color: #92400e; margin-bottom: 0.4rem;
}
.author-spotlight h3 i { margin-right: 0.4rem; color: #d97706; }
.author-spotlight p { color: #78350f; font-size: 0.9rem; margin-bottom: 0.75rem; }
.author-spotlight .btn { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 16px rgba(217,119,6,0.25); }
.author-spotlight .btn:hover { box-shadow: 0 8px 28px rgba(217,119,6,0.35); }

/* ============ CARD GRID ============ */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem; margin-bottom: 3.5rem;
}

.card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition-slow);
  position: relative;
  cursor: default;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  opacity: 0; transition: var(--transition);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(184,134,11,0.15);
  background: var(--surface-hover);
}
.card:hover::before { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.card:active { transform: translateY(-2px); transition: transform 0.1s; }

.card-type {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 0.2rem 0.55rem;
  border-radius: 4px; margin-bottom: 0.75rem;
}
.card-type.paper { background: rgba(124,58,237,0.06); color: var(--primary); }
.card-type.video { background: rgba(239,68,68,0.06); color: #dc2626; }
.card-type.creative-writing { background: rgba(217,119,6,0.06); color: #d97706; }
.card-type.external-link { background: rgba(16,185,129,0.06); color: #059669; }
.card-type.test { background: rgba(5,150,105,0.06); color: #059669; }

.test-card-stats {
  display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted);
  margin: 0.25rem 0 0; flex-wrap: wrap;
}
.test-card-stats i { width: 0.9rem; text-align: center; }

.card h3, .card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4;
  letter-spacing: -0.01em;
}
.card h3 a, .card h4 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card .meta {
  font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap;
}
.card .meta i { font-size: 0.65rem; }
.card p {
  font-size: 0.85rem; color: var(--text-soft); line-height: 1.65;
}
.card .tags { margin-top: 0.75rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: var(--primary-glow); color: var(--primary);
  font-size: 0.68rem; font-weight: 500;
  padding: 0.15rem 0.5rem; border-radius: 20px;
  transition: var(--transition);
}
.tag:hover { background: rgba(124,58,237,0.14); }
.tag i { font-size: 0.6rem; }

/* ============ CONTENT / ARTICLE PAGE ============ */
main { padding: 0 2rem; }
.content-page {
  max-width: var(--max-w-narrow); margin: 0 auto; padding: 3rem 0;
}
.content-page .article-header {
  margin-bottom: 2rem;
}
.content-page .article-header h2 {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
  margin-bottom: 0.75rem; color: var(--text);
}
.content-page .article-meta {
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap;
}
.content-page .article-meta i { font-size: 0.7rem; }
.content-page .article-meta .card-type { font-size: 0.65rem; margin: 0; }

/* Hide Google Translate Element UI (use our own dropdown) */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-te-gadget-simple,
.skiptranslate iframe { display: none !important; }
body { top: 0px !important; }

/* TTS & Translate Bars */
.tts-bar, .translate-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem; margin-bottom: 1.25rem;
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.tts-bar {
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.12);
}
.translate-bar {
  background: rgba(124,58,237,0.03);
  border: 1px solid rgba(124,58,237,0.08);
}
.tts-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff; font-weight: 600; font-size: 0.82rem;
  padding: 0.5rem 1.1rem; border: none; border-radius: 8px;
  cursor: pointer; transition: var(--transition);
  font-family: var(--font-body); white-space: nowrap;
  min-width: 80px; justify-content: center;
}
.tts-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,0.3); }
.tts-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.tts-btn.stop { background: linear-gradient(135deg, #ef4444, #f87171); }
.tts-btn.stop:hover { box-shadow: 0 4px 16px rgba(239,68,68,0.3); }
.tts-controls { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tts-controls select, .translate-bar select {
  font-size: 0.78rem; padding: 0.3rem 0.5rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text);
  font-family: var(--font-body); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  padding-right: 22px;
}
.tts-status {
  font-size: 0.75rem; color: var(--text-muted); margin-left: auto;
  white-space: nowrap;
}
.tts-progress {
  flex-basis: 100%; height: 3px; background: var(--border);
  border-radius: 2px; margin-top: 0.5rem; overflow: hidden;
  display: none;
}
.tts-progress.active { display: block; }
.tts-progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.3s ease; border-radius: 2px;
}
.tts-btn.stop { background: linear-gradient(135deg, #ef4444, #f87171); }
.translate-bar label {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 0.35rem; white-space: nowrap;
}
.translate-select { min-width: 170px; }

/* TTS sentence highlighting */
.content-body .tts-highlight {
  background: linear-gradient(90deg, rgba(16,185,129,0.12), rgba(16,185,129,0.04));
  border-left: 3px solid #10b981;
  padding-left: 0.75rem; margin-left: -0.75rem;
  border-radius: 0 4px 4px 0;
  transition: background 0.2s ease;
}
.content-body .tts-reading {
  background: rgba(16,185,129,0.22);
  border-left-color: #059669;
}

/* Summary Blockquote */
.summary {
  background: rgba(124,58,237,0.03);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem; margin: 1.5rem 0;
  font-style: italic; color: var(--text-soft); font-size: 0.95rem;
  line-height: 1.7;
}

/* Article Body */
.content-body {
  font-family: var(--font-body);
  font-size: 1.05rem; line-height: 1.85; color: var(--text);
  overflow-wrap: break-word; word-break: break-word;
}
.content-body p { margin-bottom: 1.25rem; }
.content-body h2 {
  font-family: var(--font-display);
  margin-top: 2.5rem; margin-bottom: 0.75rem;
  font-size: 1.65rem; font-weight: 700; letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}
.content-body h3 {
  font-family: var(--font-display);
  margin-top: 2rem; margin-bottom: 0.5rem;
  font-size: 1.2rem; font-weight: 600;
  scroll-margin-top: 80px;
}
.content-body a { text-decoration: underline; text-underline-offset: 2px; }
.content-body blockquote {
  border-left: 3px solid var(--gold-light);
  padding-left: 1.25rem; color: var(--text-soft);
  margin: 1.5rem 0; font-style: italic;
}
.content-body ul, .content-body ol { margin: 0 0 1.25rem 1.5rem; }
.content-body li { margin-bottom: 0.3rem; }
.content-body img { max-width: 100%; border-radius: var(--radius); margin: 1.5rem 0; }
.content-body pre {
  background: #1c1917; color: #e7e5e4;
  padding: 1.25rem; border-radius: var(--radius);
  overflow-x: auto; font-size: 0.88rem; margin: 1.5rem 0;
  font-family: var(--font-code);
}
.content-body code {
  font-family: var(--font-code); font-size: 0.88rem;
  background: rgba(124,58,237,0.06); padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
.content-body pre code { background: none; padding: 0; }
.content-body table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: 0.9rem;
}
.content-body th, .content-body td {
  padding: 0.6rem 0.75rem; border: 1px solid var(--border); text-align: left;
}
.content-body th { background: var(--bg-alt); font-weight: 600; }

/* Related */
.related {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 2px solid var(--gold-light);
}
.related h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.75rem;
}
.related h3 i { color: var(--gold); margin-right: 0.3rem; }
.related ul { list-style: none; margin: 0; }
.related li { padding: 0.35rem 0; }
.related li a { font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }
.related li a i { font-size: 0.6rem; color: var(--primary-light); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-weight: 600; font-size: 0.82rem;
  padding: 0.55rem 1.3rem; border-radius: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(124,58,237,0.2);
  border: none; cursor: pointer; font-family: var(--font-body);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,0.3); color: #fff; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary-glow); box-shadow: none; color: var(--primary-dark); }

/* ============ FOOTER ============ */
.site-footer {
  background: #1c1917; color: rgba(255,255,255,0.5);
  padding: 3.5rem 0; margin-top: 4rem;
  padding-bottom: calc(3.5rem + var(--sab, 0));
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem; flex-wrap: wrap;
}
.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.15rem;
}
.footer-brand p { font-size: 0.75rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: rgba(255,255,255,0.4); font-size: 0.8rem; transition: var(--transition); display: flex; align-items: center; gap: 0.3rem; }
.footer-links a:hover { color: #fff; }
.footer-links a i { font-size: 0.7rem; }
.social-links { display: flex; gap: 0.6rem; }
.social-links a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: 0.85rem;
}
.social-links a:hover { background: var(--primary); color: #fff; }

/* ============ TAGS PAGE ============ */
.tag-cloud { margin: 2rem 0; line-height: 2.8; }
.tag-cloud .tag { font-size: 0.82rem; padding: 0.3rem 0.85rem; }
.tag-cloud .tag:hover { background: var(--primary-glow); }

/* ============ AOM ============ */
.aom-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid rgba(184,134,11,0.12);
  border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center;
}
.aom-card h3 { font-family: var(--font-display); font-size: 1.8rem; color: #92400e; margin-bottom: 0.5rem; }
.aom-card .meta { justify-content: center; color: #78350f; font-size: 0.9rem; }

/* ============ ARCHIVE ============ */
.archive-header { padding: 3rem 0 1.5rem; }
.archive-header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 0.6rem;
}
.archive-header h2 i { color: var(--gold); font-size: 1.4rem; }

/* ============ READING PROGRESS ============ */
.reading-progress {
  position: fixed; top: var(--sat, 0); left: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary-light));
  width: 0%; transition: width 0.1s linear;
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 99;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--primary); font-size: 1rem;
  cursor: pointer; box-shadow: var(--shadow-md);
  transition: var(--transition); opacity: 0; visibility: hidden;
  display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }

/* ============ SEARCH DROPDOWN ============ */
.header-search { position: relative; }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 400px; overflow-y: auto; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.search-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.sd-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border);
  transition: background 0.12s; cursor: pointer; text-decoration: none;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--primary-glow); }
.sd-type {
  font-size: 0.58rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.12rem 0.35rem;
  border-radius: 4px; flex-shrink: 0;
}
.sd-type.paper { background: rgba(124,58,237,0.08); color: var(--primary); }
.sd-type.video { background: rgba(239,68,68,0.08); color: #dc2626; }
.sd-type.creative-writing { background: rgba(217,119,6,0.08); color: #d97706; }
.sd-type.external-link { background: rgba(16,185,129,0.08); color: #059669; }
.sd-title { flex: 1; font-size: 0.8rem; font-weight: 500; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-date { font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; }
.sd-empty { padding: 1.25rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
.sd-empty i { display: block; margin-bottom: 0.25rem; }
.sd-more { padding: 0.5rem; text-align: center; font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ============ TOUCH ============ */
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, a, select, input { touch-action: manipulation; }
input, textarea, select { font-size: 16px !important; }  /* prevent iOS zoom */

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-trigger { display: flex; }
  .main-nav { display: none; }
  .header-right { gap: 0.4rem; }
  .hero-bg .orb:nth-child(1) { width: 400px; height: 400px; top: -200px; left: -100px; }
  .hero-bg .orb:nth-child(2) { width: 300px; height: 300px; bottom: -100px; right: -80px; }
}
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  main { padding: 0 1.25rem; }
  .header-inner { gap: 0.5rem; }
  .header-search { max-width: 120px; }
  .header-search-input { font-size: 0.75rem; }
  .logo h1 { font-size: 1.1rem; }
  .logo .tagline { font-size: 0.6rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h2 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .hero-stat .num { font-size: 1.3rem; }
  .card-grid { grid-template-columns: 1fr; }
  .content-page { padding: 1.5rem 0; }
  .content-page .article-header h2 { font-size: 1.6rem; }
  .content-body { font-size: 0.98rem; }
  .content-body h2 { font-size: 1.4rem; }
  .archive-header h2 { font-size: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .tts-bar, .translate-bar { flex-direction: column; align-items: stretch; }
  .tts-controls { justify-content: center; }
  .tts-controls select, .translate-bar select { flex: 1; min-width: 0; }
  .tts-btn { justify-content: center; padding: 0.55rem 1.1rem; }
  .hero-search { margin: 1.25rem 1rem 0; }
  .search-dropdown { left: 0; right: 0; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 38px; height: 38px; }
  .summary { padding: 1rem 1.15rem; font-size: 0.9rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  main { padding: 0 1rem; }
  .header-search { max-width: 80px; }
  .header-search-icon { display: none; }
  .logo h1 { font-size: 1rem; }
  .hero h2 { font-size: 1.5rem; }
  .hero p { font-size: 0.85rem; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero-icon { font-size: 1.6rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .num { font-size: 1.1rem; }
  .card-grid { gap: 0.85rem; }
  .card { padding: 1.15rem; }
  .card h3, .card h4 { font-size: 0.95rem; }
  .content-page .article-header h2 { font-size: 1.35rem; }
  .content-page { padding: 1.5rem 0; }
  .content-body { font-size: 0.92rem; }
  .content-body h2 { font-size: 1.2rem; }
  .content-body h3 { font-size: 1.05rem; }
  .content-page .article-meta { font-size: 0.7rem; }
  .tts-bar, .translate-bar { padding: 0.6rem 0.85rem; }
  .tts-controls { flex-direction: column; gap: 0.35rem; }
  .tts-controls select { width: 100%; }
  .author-spotlight { padding: 1.5rem; }
  .hero-bg .orb:nth-child(1) { width: 250px; height: 250px; top: -120px; left: -60px; }
  .hero-bg .orb:nth-child(2) { width: 200px; height: 200px; bottom: -80px; right: -50px; }
  .hero-bg .orb:nth-child(3) { display: none; }
  .footer-links { gap: 0.75rem; flex-direction: column; align-items: center; }
  .search-dropdown { max-height: 300px; }
}

/* ============ YOUTUBE EMBED ============ */
.video-embed {
  position: relative; width: 100%; padding-bottom: 56.25%;
  margin: 1.5rem 0; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); background: #000;
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: 0;
}

/* ============ VIDEO THUMBNAIL ============ */
.video-thumb {
  position: relative; margin-bottom: 0.75rem; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16/9; background: var(--bg-alt);
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.card:hover .video-thumb img { transform: scale(1.05); }
.video-thumb-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
  backdrop-filter: blur(4px);
}
.card:hover .video-thumb-play { background: #ff0000; transform: translate(-50%, -50%) scale(1.1); }

/* ============ GOOGLE HOME ============ */
body.google-home {
  --bg: #fff;
  background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: 0;
}

/* ============ VIDEO THUMBNAIL ============ */
.video-thumb {
  position: relative; margin-bottom: 0.75rem; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16/9; background: var(--bg-alt);
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.card:hover .video-thumb img { transform: scale(1.05); }
.video-thumb-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
  backdrop-filter: blur(4px);
}
.card:hover .video-thumb-play { background: #ff0000; transform: translate(-50%, -50%) scale(1.1); }

/* ============ AOS ANIMATION ============ */
.aos-hidden {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.aos-visible { opacity: 1; transform: translateY(0); }

/* On content pages, skip AOS transitions for first-screen elements */
.content-page .article-header.aos-hidden,
.content-page .tts-bar.aos-hidden,
.content-page .translate-bar.aos-hidden {
  opacity: 1; transform: none;
  transition: none;
}

/* ============ VISITOR STATS ============ */
.stats-subtitle {
  text-align: center; color: var(--text-muted);
  font-size: 0.9rem; margin: -1rem 0 2rem;
}
.stats-grid {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 140px;
  flex: 1;
  max-width: 200px;
  transition: var(--transition);
}
.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.stat-icon {
  font-size: 1.3rem;
  color: var(--primary-light);
  margin-bottom: 0.4rem;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-badge {
  display: inline-block;
  font-size: 0.6rem;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  text-transform: lowercase;
  letter-spacing: 0;
}
.stat-footer {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.stat-placeholder {
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
}
@media (max-width: 600px) {
  .stat-item { min-width: 100px; max-width: 160px; padding: 1rem 1.25rem; }
  .stat-number { font-size: 1.5rem; }
}

/* ============ SUBMIT WRITING PAGE ============ */
.submit-layout {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 2rem; max-width: 960px; margin: 0 auto; padding: 2rem 0;
}
.submit-info h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 700; margin-bottom: 0.75rem;
}
.submit-info > p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.7;
  margin-bottom: 1.25rem;
}
.submit-guidelines {
  list-style: none; margin: 0; padding: 0;
}
.submit-guidelines li {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0; font-size: 0.85rem; color: var(--text-soft);
}
.submit-guidelines li i { color: var(--primary); font-size: 0.85rem; }
.submit-form iframe { border: 1px solid var(--border); }
@media (max-width: 768px) {
  .submit-layout { grid-template-columns: 1fr; }
}

/* ============ SUBMIT - EMAIL VERSION ============ */
.submit-email-card {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(124,58,237,0.04);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem; margin: 1.25rem 0;
}
.submit-email-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.submit-email-details { font-size: 0.92rem; }
.submit-email-details strong { display: block; margin-bottom: 0.2rem; color: var(--text); }
.submit-email-link {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--primary); word-break: break-all;
}
.submit-tips {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.submit-tips h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
}
.tip-item {
  display: flex; gap: 0.5rem; padding: 0.4rem 0;
  font-size: 0.88rem; color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.tip-item:last-child { border-bottom: none; }
.tip-label { font-weight: 600; color: var(--text); min-width: 90px; flex-shrink: 0; }
.submit-cta { margin-top: 1.5rem; }

/* ============ NEW HOMEPAGE STYLES ============ */

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #d946ef, var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(124,58,237,0.08); color: var(--primary);
  padding: 0.4rem 1rem; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(124,58,237,0.12);
}

/* Hero Contents inside the existing hero block */
.hero-content {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto;
  text-align: center; padding: 3rem 0 1rem;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: 3.5rem; font-weight: 800;
  line-height: 1.1; margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-soft);
  max-width: 620px; margin: 0 auto 1.75rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex; gap: 0.75rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2rem;
}

/* ============ SECTION ============ */
.section {
  padding: 4rem 0;
}
.section-cta {
  text-align: center; margin-top: 1.5rem;
}

/* ============ FEATURES GRID ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-slow);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124,58,237,0.12);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(124,58,237,0.02));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.3rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.88rem; color: var(--text-soft); line-height: 1.7;
}

/* ============ HOW IT WORKS STEPS ============ */
.steps {
  display: flex; flex-direction: column; gap: 1.5rem;
  max-width: 700px; margin: 0 auto;
}
.step {
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.step-number {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(124,58,237,0.2);
}
.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 0.3rem;
}
.step-content p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.7;
}

/* ============ SHOWCASE ============ */
.showcase-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  align-items: center;
}
.showcase-text h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.showcase-text > p {
  font-size: 0.92rem; color: var(--text-soft);
  line-height: 1.7; margin-bottom: 1.25rem;
}
.showcase-list {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
}
.showcase-list li {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0; font-size: 0.88rem; color: var(--text-soft);
}
.showcase-list li i { color: var(--primary); font-size: 0.9rem; }
.showcase-video {
  position: relative;
}
.video-caption {
  text-align: center; margin-top: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ============ CTA SECTION ============ */
.cta-card {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-radius: var(--radius-lg);
  padding: 4rem 2.5rem;
  text-align: center;
  color: #fff;
}
.cta-card h2 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  margin-bottom: 0.75rem;
}
.cta-card p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}
.cta-actions {
  display: flex; gap: 0.75rem; justify-content: center;
  flex-wrap: wrap;
}
.cta-card .btn-outline {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  box-shadow: none;
}
.cta-card .btn-outline:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}
.btn-lg {
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
}

/* ============ FOOTER GRID ============ */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2.5rem;
  align-items: start;
}
.footer-brand { margin-bottom: 0; }
.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}
.footer-brand > p {
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}
.footer-info p {
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
  line-height: 1.6;
}
.footer-info p i { margin-right: 0.3rem; }

/* Responsive overwrites for footer grid */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .social-links { justify-content: center; }
  .showcase-card { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-card { padding: 2.5rem 1.5rem; }
  .cta-card h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content { padding: 1.5rem 0; }
  .step { flex-direction: column; align-items: center; text-align: center; }
  .section { padding: 2.5rem 0; }
  .showcase-card { padding: 1.5rem; }
}

/* ============ AOS ANIMATION (CSS-first, no FOUC) ============ */
/* Safety override: content page elements must NEVER be hidden by AOS */
.content-page.aos-animate,
.content-page .article-header.aos-animate,
.content-page .tts-bar.aos-animate,
.content-page .translate-bar.aos-animate,
.content-page .summary.aos-animate,
.content-page .content-body.aos-animate,
.content-page .toc.aos-animate {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.aos-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.aos-animate.aos-in {
  opacity: 1;
  transform: translateY(0);
}
[data-aos="zoom-in"].aos-animate {
  transform: scale(0.95);
}
[data-aos="zoom-in"].aos-animate.aos-in {
  transform: scale(1);
}
[data-aos="fade-down"].aos-animate {
  transform: translateY(-20px);
}
[data-aos="fade-down"].aos-animate.aos-in {
  transform: translateY(0);
}

/* ============ ARCHIVE FILTER BAR ============ */
.archive-filter {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.archive-search-box {
  display: flex; align-items: center; gap: 0.6rem;
  flex: 1; min-width: 200px; max-width: 420px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.55rem 1rem;
  transition: var(--transition);
}
.archive-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.archive-search-box > i { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }
.archive-search-box input {
  border: none; outline: none; background: transparent;
  font-size: 0.88rem; font-family: var(--font-body); color: var(--text);
  width: 100%;
}
.archive-search-box input::placeholder { color: var(--text-muted); }
.archive-filter-clear {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 0.8rem; padding: 0.2rem;
  opacity: 0; transition: var(--transition); flex-shrink: 0;
}
.archive-filter-clear:hover { color: var(--primary); }
.archive-count {
  font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
  white-space: nowrap;
}
.archive-no-results {
  text-align: center; padding: 4rem 0; color: var(--text-muted);
}
.archive-no-results i { font-size: 2.5rem; display: block; margin-bottom: 1rem; opacity: 0.3; }
.archive-no-results p { font-size: 0.95rem; }

/* ============ TABLE OF CONTENTS ============ */
.toc {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem; position: relative;
}
.toc-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.toc-header i { color: var(--gold); font-size: 0.8rem; }
.toc-toggle {
  margin-left: auto; background: none; border: none;
  color: var(--text-muted); cursor: pointer; padding: 0.2rem;
  font-size: 0.75rem; transition: var(--transition);
}
.toc-toggle:hover { color: var(--primary); }
.toc-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 300px; overflow-y: auto;
  transition: max-height 0.3s ease;
}
.toc.toc-collapsed .toc-list { max-height: 0; overflow: hidden; margin: 0; }
.toc-item { padding: 0; margin: 0; }
.toc-item a {
  display: block; padding: 0.3rem 0.5rem; font-size: 0.84rem;
  color: var(--text-soft); text-decoration: none;
  border-left: 2px solid transparent;
  transition: var(--transition); border-radius: 0 4px 4px 0;
}
.toc-item a:hover { color: var(--primary); background: var(--primary-glow); }
.toc-item.toc-h3 a { padding-left: 1.5rem; font-size: 0.8rem; font-weight: 400; }
.toc-item a.toc-active {
  color: var(--primary); font-weight: 600;
  border-left-color: var(--primary); background: var(--primary-glow);
}

/* ============ HOMEPAGE SECTIONS ============ */
.section {
  padding: 4rem 0; max-width: var(--max-w); margin: 0 auto;
}

/* Hero Content */
.hero-content {
  position: relative; z-index: 1; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--primary-glow); color: var(--primary);
  font-size: 0.75rem; font-weight: 600;
  padding: 0.35rem 0.9rem; border-radius: 20px;
  margin-bottom: 1.5rem; border: 1px solid rgba(124,58,237,0.12);
}
.hero-badge i { font-size: 0.7rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 1rem; color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, #4c1d95, #7c3aed, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.05rem; color: var(--text-soft);
  max-width: 580px; margin: 0 auto 1rem; line-height: 1.7;
}
.hero-actions {
  display: flex; justify-content: center; gap: 0.75rem;
  margin-top: 1.5rem; flex-wrap: wrap;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow-sm); transition: var(--transition-slow);
}
.feature-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: rgba(124,58,237,0.15);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(124,58,237,0.12));
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.1rem; margin-bottom: 0.85rem;
}
.feature-card h3 {
  font-family: var(--font-display); font-size: 1.05rem;
  font-weight: 600; margin-bottom: 0.4rem; color: var(--text);
}
.feature-card p {
  font-size: 0.85rem; color: var(--text-soft); line-height: 1.65;
}

/* How It Works Steps */
.steps {
  display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem;
}
.step {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.step:hover { box-shadow: var(--shadow-md); border-color: rgba(124,58,237,0.1); }
.step-number {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.step-content h3 {
  font-family: var(--font-display); font-size: 1rem;
  font-weight: 600; margin-bottom: 0.3rem; color: var(--text);
}
.step-content p {
  font-size: 0.85rem; color: var(--text-soft); line-height: 1.65;
}

/* Showcase Card */
.showcase-card {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  box-shadow: var(--shadow-md); margin-top: 1.5rem;
}
.showcase-text h3 {
  font-family: var(--font-display); font-size: 1.4rem;
  font-weight: 700; margin-bottom: 0.75rem; color: var(--text);
}
.showcase-text > p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.7; margin-bottom: 1rem;
}
.showcase-list {
  list-style: none; margin: 0 0 1.25rem; padding: 0;
}
.showcase-list li {
  padding: 0.4rem 0; font-size: 0.85rem; color: var(--text-soft);
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.showcase-list li i { color: var(--primary); font-size: 0.8rem; margin-top: 0.2rem; flex-shrink: 0; }
.showcase-video .video-embed { margin: 0; }
.video-caption {
  font-size: 0.78rem; color: var(--text-muted); text-align: center;
  margin-top: 0.6rem;
}

/* CTA Section */
.section-cta { text-align: center; margin-top: 1.5rem; }
.cta-section { padding: 3rem 0; }
.cta-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(184,134,11,0.04));
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center;
  max-width: var(--max-w); margin: 0 auto;
}
.cta-card h2 {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  margin-bottom: 0.75rem; color: var(--text);
}
.cta-card > p {
  font-size: 0.95rem; color: var(--text-soft); max-width: 480px;
  margin: 0 auto 1.5rem; line-height: 1.7;
}
.cta-actions {
  display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap;
}

/* Buttons — extra variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; box-shadow: 0 4px 16px rgba(124,58,237,0.2);
}
.btn-primary:hover { color: #fff; }
.btn-lg {
  font-size: 0.95rem; padding: 0.75rem 1.85rem; border-radius: 10px;
}
.btn-accent {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 16px rgba(5,150,105,0.25);
}
.btn-accent:hover { box-shadow: 0 8px 28px rgba(5,150,105,0.35); transform: translateY(-2px); color: #fff; }

/* Impact Stats Section */
.stats-section { padding: 3.5rem 0; }
.stats-subtitle {
  text-align: center; font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem; margin-bottom: 1.5rem;
}
.stat-item {
  text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem 1rem; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.chart-container {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.chart-container canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-glow); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem; font-size: 1rem;
}
.stat-number {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  color: var(--primary-dark); line-height: 1.1; margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.stat-footer {
  text-align: center; font-size: 0.8rem; color: var(--text-muted);
  padding-top: 1rem; border-top: 1px solid var(--border);
}

/* ============ FOOTER GRID ============ */
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1.5fr;
  gap: 2rem; align-items: start;
}
.footer-brand h3 { margin-bottom: 0.25rem; }
.footer-brand p { margin-bottom: 0.75rem; }
.footer-links {
  display: flex; flex-direction: column; gap: 0.4rem;
}
.footer-info p { font-size: 0.78rem; margin-bottom: 0.4rem; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .aos-animate { opacity: 1 !important; transform: none !important; }
  .hero-bg .orb { animation: none !important; }
}

/* ============ HOMEPAGE RESPONSIVE ============ */
@media (max-width: 768px) {
  .section { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .showcase-card { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.25rem; }
  .step { flex-direction: column; gap: 0.75rem; padding: 1.25rem; }
  .cta-card { padding: 2rem 1.25rem; }
  .cta-card h2 { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { align-items: center; }
  .footer-brand .social-links { justify-content: center; }
}
@media (max-width: 480px) {
  .chart-container { padding: 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-subtitle { font-size: 0.85rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-number { font-size: 1.4rem; }
  .feature-card { padding: 1.25rem; }
  .showcase-card { padding: 1.25rem; }
}

/* ============ GLOBAL FOCUS STYLES ============ */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ SHARE BUTTONS ============ */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-right: 0.25rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.share-btn:hover {
  transform: translateY(-2px);
  border-color: transparent;
}
.share-btn.share-twitter:hover { background: #000; color: #fff; }
.share-btn.share-bluesky:hover { background: #0285ff; color: #fff; }
.share-btn.share-linkedin:hover { background: #0a66c2; color: #fff; }
.share-btn.share-facebook:hover { background: #1877f2; color: #fff; }
.share-btn.share-reddit:hover { background: #ff4500; color: #fff; }
.share-btn.share-copy:hover { background: var(--primary); color: #fff; }

html.dark .share-btn { border-color: var(--border); }
html.dark .share-btn.share-twitter:hover { background: #fff; color: #000; }

/* ============ PRINT STYLES ============ */
@media print {
  .site-header, .site-footer, .back-to-top, .reading-progress,
  .tts-bar, .translate-bar, .toc, .nav-overlay, .nav-drawer,
  .header-search, .theme-toggle, .nav-trigger, .related,
  .hero-bg, .section-divider { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  .content-page { max-width: none; padding: 0; }
  .content-body { font-size: 12pt; line-height: 1.6; }
  .content-body h2 { font-size: 16pt; page-break-after: avoid; }
  .content-body h3 { font-size: 13pt; page-break-after: avoid; }
  .content-body p, .content-body li { orphans: 3; widows: 3; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  .summary { border: 1px solid #ccc; }
}
