/* ========================================
   DESIGN TOKENS
   ======================================== */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Erode', 'Georgia', serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* ========================================
   LIGHT MODE (default) — Literary warm palette
   ======================================== */

:root, [data-theme="light"] {
  --color-bg:             #FAF8F3;
  --color-surface:        #F5F2EB;
  --color-surface-2:      #EFECE4;
  --color-border:         #D8D3C8;
  --color-text:           #2A2520;
  --color-text-muted:     #7A756C;
  --color-text-faint:     #B0ABA2;
  --color-text-inverse:   #FAF8F3;
  --color-primary:        #8B4513;
  --color-primary-hover:  #6B3410;
  --color-primary-light:  rgba(139, 69, 19, 0.08);
  --color-accent:         #1A5C3A;
  --color-accent-light:   rgba(26, 92, 58, 0.08);

  --shadow-sm: 0 1px 3px rgba(42, 37, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(42, 37, 32, 0.08);
  --shadow-lg: 0 12px 32px rgba(42, 37, 32, 0.12);
}

/* ========================================
   DARK MODE — Deep literary dark
   ======================================== */

[data-theme="dark"] {
  --color-bg:             #1A1814;
  --color-surface:        #242018;
  --color-surface-2:      #2E2A20;
  --color-border:         #3E3828;
  --color-text:           #E8E2D8;
  --color-text-muted:     #9A9488;
  --color-text-faint:     #5E5848;
  --color-text-inverse:   #1A1814;
  --color-primary:        #D4A06A;
  --color-primary-hover:  #E8B87A;
  --color-primary-light:  rgba(212, 160, 106, 0.1);
  --color-accent:         #6ABF8A;
  --color-accent-light:   rgba(106, 191, 138, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #1A1814;
    --color-surface:        #242018;
    --color-surface-2:      #2E2A20;
    --color-border:         #3E3828;
    --color-text:           #E8E2D8;
    --color-text-muted:     #9A9488;
    --color-text-faint:     #5E5848;
    --color-text-inverse:   #1A1814;
    --color-primary:        #D4A06A;
    --color-primary-hover:  #E8B87A;
    --color-primary-light:  rgba(212, 160, 106, 0.1);
    --color-accent:         #6ABF8A;
    --color-accent-light:   rgba(106, 191, 138, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

/* ========================================
   GLOBAL LAYOUT
   ======================================== */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

/* ========================================
   HEADER
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s var(--ease-out);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.header__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header__title span {
  display: none;
}

@media (min-width: 640px) {
  .header__title span { display: inline; }
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-btn {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all var(--transition-interactive);
}

.header__nav-btn:hover {
  color: var(--color-text);
  background: var(--color-primary-light);
}

.header__nav-btn.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 500;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: all var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-primary-light);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, var(--color-primary-light) 0%, transparent 70%);
  pointer-events: none;
}

.hero__subtitle {
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  position: relative;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
  position: relative;
}

.hero__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  line-height: 1.7;
  position: relative;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-10);
  position: relative;
}

.hero__stat {
  text-align: center;
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ========================================
   ERA NAVIGATION (horizontal scrollable)
   ======================================== */

.era-nav {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 56px;
  z-index: 90;
  background: oklch(from var(--color-bg) l c h / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.era-nav__scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-inline: var(--space-4);
  scroll-snap-type: x proximity;
}

.era-nav__scroll::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .era-nav__scroll {
    padding-inline: var(--space-8);
    justify-content: center;
  }
}

.era-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  scroll-snap-align: start;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
  cursor: pointer;
}

.era-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.era-chip.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.era-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ========================================
   TIMELINE LINE
   ======================================== */

.timeline {
  position: relative;
  padding: var(--space-12) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-border) 5%, var(--color-border) 95%, transparent);
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-1px);
  }
}

/* ========================================
   ERA SECTION
   ======================================== */

.era-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: 140px;
}

.era-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-left: 48px;
  position: relative;
}

.era-section__marker {
  position: absolute;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 3px solid;
  background: var(--color-bg);
  z-index: 2;
}

.era-section__info {
  flex: 1;
}

.era-section__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.era-section__period {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.era-section__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 65ch;
  margin-bottom: var(--space-6);
  padding-left: 48px;
}

@media (min-width: 768px) {
  .era-section__header {
    padding-left: 0;
    justify-content: center;
    text-align: center;
  }
  .era-section__marker {
    position: relative;
    left: auto;
  }
  .era-section__desc {
    padding-left: 0;
    text-align: center;
    margin-inline: auto;
  }
}

/* Movements / sub-genres */
.era-movements {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-left: 48px;
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .era-movements {
    padding-left: 0;
    justify-content: center;
  }
}

.movement-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* ========================================
   AUTHOR CARD GRID
   ======================================== */

.authors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-left: 48px;
}

@media (min-width: 640px) {
  .authors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .authors-grid {
    padding-left: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .authors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   AUTHOR CARD
   ======================================== */

.author-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: all var(--transition-interactive);
  position: relative;
  overflow: hidden;
}

.author-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

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

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

.author-card:active {
  transform: translateY(0);
}

.author-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.author-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.author-card__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
}

.author-card__name-en {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}

.author-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.author-card__style {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.author-card__works {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.work-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   MODAL OVERLAY
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease-out);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  z-index: 10;
  transition: all var(--transition-interactive);
}

.modal__close:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.modal__header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.modal__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-3);
}

.modal__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
}

.modal__name-en {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}

.modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.modal__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.modal__body {
  padding: var(--space-6);
}

.modal__section {
  margin-bottom: var(--space-6);
}

.modal__section:last-child {
  margin-bottom: 0;
}

.modal__section-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.modal__bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.modal__style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.modal__style-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid transparent;
}

/* Work list in modal */
.work-item {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-interactive);
}

.work-item:last-child {
  margin-bottom: 0;
}

.work-item:hover {
  border-color: var(--color-primary);
}

.work-item__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.work-item__title-en {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
  margin-left: var(--space-2);
}

.work-item__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
  display: flex;
  gap: var(--space-3);
}

.work-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: var(--space-2);
}

.work-item__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  margin-top: var(--space-2);
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary);
  transition: all var(--transition-interactive);
}

.work-item__link:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ========================================
   SEARCH BAR
   ======================================== */

.search-wrapper {
  padding: var(--space-4) 0 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  max-width: 480px;
  margin-inline: auto;
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.search-bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--text-sm);
  outline: none;
  color: var(--color-text);
  min-width: 0;
}

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

/* ========================================
   FILTER CONTROLS
   ======================================== */

.filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-3) 0 var(--space-6);
  flex-wrap: wrap;
}

.filter-select {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  padding-right: var(--space-6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a756c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select:focus {
  border-color: var(--color-primary);
  outline: none;
}

.results-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  color: var(--color-text-faint);
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) 0;
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}

.footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

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

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in { opacity: 1; }

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ========================================
   VIEW MODES
   ======================================== */

.view-all .timeline::before { display: none; }
.view-all .era-section__header { padding-left: 0; text-align: center; justify-content: center; }
.view-all .era-section__marker { position: relative; left: auto; }
.view-all .era-section__desc { padding-left: 0; text-align: center; margin-inline: auto; }
.view-all .era-movements { padding-left: 0; justify-content: center; }
.view-all .authors-grid { padding-left: 0; }

/* ========================================
   BACK TO TOP
   ======================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 50;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-interactive);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   MOBILE ADJUSTMENTS
   ======================================== */

@media (max-width: 639px) {
  .hero__stats {
    gap: var(--space-4);
  }
  .hero__stat-num {
    font-size: var(--text-lg);
  }
  .author-card__works {
    display: none;
  }
}

/* Hide scrollbar for era nav on mobile */
@media (max-width: 767px) {
  .era-nav__scroll {
    -webkit-overflow-scrolling: touch;
  }
}
