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

:root {
  --bg: #121212;
  --bg-card: #181818;
  --bg-card-hover: #1e1e1e;
  --border-card: #242424;
  --text: #d4d4d4;
  --text-soft: #c0c0c0;
  --text-muted: #777777;
  --text-dim: #555555;
  --accent: #c8960c;
  --accent-bright: #ffd633;
  --accent-muted: #8b6508;
  --gold-gradient: linear-gradient(135deg, #fff8dc 0%, #ffd633 20%, #c8960c 45%, #b8860b 55%, #ffd633 75%, #fff8dc 100%);
  --grid-line: rgba(255, 255, 255, 0.03);
  --grid-line-major: rgba(255, 255, 255, 0.06);
  --container-max: none;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.6s;
  --duration-glacial: 1s;
  --shadow-control: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.3);
  --glow-gold-soft: 0 0 20px rgba(200, 150, 12, 0.22);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  scroll-padding-top: 32px;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.paper-card:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 12px;
}

.paper-view-close:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: #000;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transform: translateY(-100%);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 350;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, black 30%, transparent 70%);
  animation: gridFadeIn 2s var(--ease-out-expo) both;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  opacity: 0.4;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 4px;
  border: 2px solid var(--bg);
  transition: background var(--duration-normal) var(--ease-out-quart);
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-muted);
}

.container {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.site-header {
  padding: 80px 0 48px;
  text-align: center;
  position: relative;
}

.site-title {
  font-family: 'Geist', sans-serif;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--text);
  animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.gold-shadow {
  display: inline-block;
  filter: drop-shadow(0 20px 15px rgba(0, 0, 0, 0.65));
  margin-left: 12px;
}

.site-title .gold {
  display: inline-block;
  font-family: 'Fredoka', 'Geist', sans-serif;
  font-weight: 700;
  color: #000;
  filter: url(#puffy-3d-gold);
}

.site-subtitle {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 16px;
  animation: fadeUp 0.8s 0.12s var(--ease-out-expo) both;
}

.header-divider {
  width: 60px;
  height: 1px;
  background: var(--gold-gradient);
  margin: 32px auto 0;
  opacity: 0.5;
  position: relative;
  animation: fadeUp 0.8s 0.2s var(--ease-out-expo) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes gridFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dividerGlow {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.6; }
}

.toolbar {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  animation: fadeUp 0.6s 0.3s var(--ease-out-expo) both;
}

.toolbar-search input,
.toolbar-select select,
.toolbar-reset,
.toolbar-chip,
.paper-view-link {
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  transition:
    border-color var(--duration-normal) var(--ease-in-out-smooth),
    background var(--duration-normal) var(--ease-in-out-smooth),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    transform var(--duration-fast) var(--ease-out-expo),
    color var(--duration-fast) var(--ease-in-out-smooth);
}

.toolbar-search input {
  min-width: min(360px, 100%);
}

.toolbar-search input:hover,
.toolbar-select select:hover {
  border-color: rgba(200, 150, 12, 0.25);
  background: rgba(30, 30, 30, 0.8);
}

.toolbar-search input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(200, 150, 12, 0.1),
    0 4px 20px rgba(0, 0, 0, 0.3);
  outline: none;
  background: rgba(26, 26, 26, 0.95);
}

.toolbar-select select:focus,
.toolbar-reset:focus,
.toolbar-chip:focus,
.paper-view-link:focus,
.empty-state button:focus {
  outline: none;
}

.toolbar-select select:focus-visible,
.toolbar-reset:focus-visible,
.toolbar-chip:focus-visible,
.paper-view-link:focus-visible,
.empty-state button:focus-visible {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(200, 150, 12, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.toolbar-chip {
  cursor: pointer;
  background: var(--bg-card);
  transition: all var(--duration-normal) var(--spring);
}

.toolbar-chip.is-active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent-bright);
  box-shadow: 0 0 20px rgba(200, 150, 12, 0.25);
  transform: scale(1.02);
}

.toolbar-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 150, 12, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.toolbar-chip:active {
  transform: translateY(0) scale(0.96);
}

.toolbar-reset {
  cursor: pointer;
  background: transparent;
}

.toolbar-reset:hover,
.paper-view-link:hover {
  color: var(--accent);
  border-color: rgba(200, 150, 12, 0.3);
  background: rgba(30, 30, 30, 0.8);
  transform: translateY(-1px);
  box-shadow: var(--shadow-control);
}

.toolbar-reset:active,
.paper-view-link:active {
  transform: translateY(0) scale(0.97);
}

.section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
  padding-left: 2px;
  animation: fadeUp 0.5s 0.4s var(--ease-out-expo) both;
}

.papers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 96px;
  list-style: none;
}

@media (max-width: 1100px) {
  .papers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .papers-grid {
    grid-template-columns: 1fr;
  }
}

.paper-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  animation: fadeUp var(--duration-slow) var(--ease-out-expo) both;
  will-change: transform, box-shadow;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(28px) scale(0.97);
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-in-out-smooth),
    background var(--duration-normal) var(--ease-in-out-smooth),
    box-shadow var(--duration-slow) var(--ease-out-expo),
    opacity var(--duration-slow) var(--ease-out-expo),
    filter var(--duration-slow) var(--ease-out-expo);
}

.paper-card.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.paper-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(200, 150, 12, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-expo);
  pointer-events: none;
}

.paper-card:hover {
  border-color: rgba(200, 150, 12, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-4px) scale(1.008);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(200, 150, 12, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.paper-card:active {
  transform: translateY(-1px) scale(0.995);
  transition: all 0.1s var(--ease-out-expo);
}

.paper-card:nth-child(1) { animation-delay: 0s; }
.paper-card:nth-child(2) { animation-delay: 0.07s; }
.paper-card:nth-child(3) { animation-delay: 0.14s; }
.paper-card:nth-child(4) { animation-delay: 0.21s; }
.paper-card:nth-child(5) { animation-delay: 0.28s; }
.paper-card:nth-child(6) { animation-delay: 0.35s; }
.paper-card:nth-child(7) { animation-delay: 0.42s; }
.paper-card:nth-child(8) { animation-delay: 0.49s; }
.paper-card:nth-child(9) { animation-delay: 0.56s; }
.paper-card:nth-child(10) { animation-delay: 0.63s; }

.card-title {
  font-family: 'Geist', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 10px;
}

.card-author {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-muted);
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.card-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-muted);
  background: rgba(200, 150, 12, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(200, 150, 12, 0.12);
  transition:
    background var(--duration-normal) var(--ease-in-out-smooth),
    border-color var(--duration-normal) var(--ease-in-out-smooth);
}

.paper-card:hover .card-tag {
  background: rgba(200, 150, 12, 0.12);
  border-color: rgba(200, 150, 12, 0.2);
}

.card-proved {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a7a1a;
  background: rgba(26, 122, 26, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(26, 122, 26, 0.2);
  flex-shrink: 0;
}

.card-disproved {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(185, 28, 28, 0.2);
  flex-shrink: 0;
}

.paper-card.super-featured {
  position: relative;
  overflow: hidden;
  border-color: var(--accent-bright);
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(200, 150, 12, 0.1), transparent 70%), var(--bg-card);
  box-shadow: 0 0 30px rgba(200, 150, 12, 0.2), inset 0 0 20px rgba(200, 150, 12, 0.05);
  transform: scale(1.02);
}

.paper-card.super-featured:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow-gold-soft);
}

.paper-card.super-featured .card-title {
  color: var(--accent-bright);
  text-shadow: 0 0 15px rgba(255, 214, 51, 0.4);
  font-size: 32px;
}

.paper-card.featured {
  grid-column: 1 / -1;
  padding: 48px 56px;
  min-height: 220px;
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(200, 150, 12, 0.04), transparent 60%), var(--bg-card);
}

.paper-card.featured .card-title {
  font-size: 28px;
  letter-spacing: 0;
}

.paper-card.featured .card-author {
  font-size: 12px;
  margin-bottom: 12px;
}

.paper-card.featured .card-meta {
  font-size: 13px;
}

.paper-card.featured:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(200, 150, 12, 0.07), transparent 60%), var(--bg-card-hover);
}

.paper-card.super-featured::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 214, 51, 0.03) 45%,
    rgba(255, 214, 51, 0.06) 50%,
    rgba(255, 214, 51, 0.03) 55%,
    transparent 60%
  );
  animation: shimmer 9s var(--ease-in-out-smooth) infinite;
  pointer-events: none;
}

@media (max-width: 640px) {
  .paper-card.featured {
    padding: 28px 24px;
    min-height: 160px;
  }

  .paper-card.featured .card-title {
    font-size: 22px;
  }
}

.card-arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-dim);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.paper-card:hover .card-arrow {
  opacity: 1;
  color: var(--accent);
}

.collection-status {
  margin-top: -64px;
  padding-bottom: 64px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.paper-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  overflow-y: auto;
  animation: overlayIn 0.4s var(--ease-out-expo);
}

@keyframes overlayIn {
  from { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

.paper-view {
  background: #1a1a1a;
  border: none;
  border-radius: 0;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding: 64px clamp(32px, 8vw, 120px) 80px;
  position: relative;
  animation: modalIn 0.5s 0.1s var(--ease-out-expo) both;
  box-shadow: none;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(40px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.paper-overlay.closing {
  animation: overlayOut 0.3s var(--ease-in-out-smooth) forwards;
}

.paper-overlay.closing .paper-view {
  animation: modalOut 0.25s var(--ease-in-out-smooth) forwards;
}

@keyframes overlayOut {
  to { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
}

@keyframes modalOut {
  to { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
}

.paper-view-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-family: 'Geist Mono', monospace;
  transition:
    border-color var(--duration-normal) var(--ease-in-out-smooth),
    color var(--duration-normal) var(--ease-in-out-smooth),
    background var(--duration-normal) var(--ease-in-out-smooth),
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
  z-index: 10;
}

.paper-view-close:hover {
  border-color: rgba(200, 150, 12, 0.4);
  color: var(--accent);
  background: #111;
  transform: scale(1.08);
  box-shadow: var(--shadow-control);
}

.paper-view-close:active {
  transform: scale(0.92);
  transition: transform 0.08s var(--ease-out-expo);
}

.paper-page {
  padding: 0;
}

.paper-page-shell {
  max-width: 900px;
  margin: 0 auto;
}

.paper-page-title {
  font-family: 'Geist', sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 12px;
}

.paper-page-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.paper-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.paper-view-link {
  text-decoration: none;
  cursor: pointer;
}

.paper-view-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 224px);
  border: 0;
  background: transparent;
}

.papermaker-callout {
  text-align: center;
  padding: 48px 24px 32px;
  max-width: 560px;
  margin: 0 auto;
}

.papermaker-callout p {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 350;
  line-height: 1.6;
  color: var(--text-dim);
}

.papermaker-callout .role-name {
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  color: var(--accent-muted);
}

.site-footer {
  text-align: center;
  padding: 0 0 64px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.5;
  transition: opacity var(--duration-slow) var(--ease-in-out-smooth);
}

.site-footer:hover {
  opacity: 0.8;
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  grid-column: 1 / -1;
  border: 1px dashed var(--border-card);
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.7);
  animation: fadeUp var(--duration-slow) var(--ease-out-expo) both;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 12px;
}

.empty-state button {
  cursor: pointer;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 10px 14px;
  transition:
    border-color var(--duration-normal) var(--ease-in-out-smooth),
    color var(--duration-normal) var(--ease-in-out-smooth),
    background var(--duration-normal) var(--ease-in-out-smooth),
    transform var(--duration-normal) var(--spring),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}

.empty-state button:hover {
  border-color: var(--accent-muted);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-control);
}

.empty-state button:active {
  transform: translateY(0) scale(0.97);
}

.error-banner {
  text-align: center;
  padding: 60px 24px;
  grid-column: 1 / -1;
}

.error-banner p {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.paper-body {
  color: var(--text-soft);
  max-width: 900px;
  margin: 0 auto;
}

.paper-body h1 {
  font-family: 'Geist', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}

.paper-body h2 {
  font-family: 'Geist', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-soft);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(90deg, var(--border-card), transparent);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  border-bottom: 1px solid var(--border-card);
  transition: color var(--duration-normal) var(--ease-in-out-smooth);
}

.paper-body h2:first-child {
  margin-top: 0;
}

.paper-body h3 {
  font-family: 'Geist', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 22px 0 8px;
}

.paper-body p {
  margin-bottom: 14px;
  line-height: 1.75;
}

.paper-body ol,
.paper-body ul {
  margin: 0 0 14px 24px;
}

.paper-body li {
  margin-bottom: 6px;
}

.paper-body strong {
  font-weight: 600;
  color: var(--text);
}

.paper-body em {
  font-style: italic;
}

.paper-body code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.82em;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-card);
  color: var(--accent);
}

.paper-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 150, 12, 0.3);
  transition:
    border-color var(--duration-normal) var(--ease-in-out-smooth),
    color var(--duration-normal) var(--ease-in-out-smooth);
}

.paper-body a:hover {
  color: var(--accent-bright);
  border-color: var(--accent-bright);
}

.paper-body hr {
  border: none;
  border-top: 1px solid var(--border-card);
  margin: 28px 0;
}

.paper-body p, 
.paper-body h1, 
.paper-body h2, 
.paper-body h3, 
.paper-body li,
.paper-body blockquote {
  /* Ensure parent has relative for cursor positioning if needed */
  position: relative;
}

.word-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
  opacity: 0;
  padding: 0 1px;
  transition: opacity 0.3s var(--ease-out-expo);
}

.word-wrapper.revealing,
.word-wrapper.revealed {
  opacity: 1;
}

.word-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1;
  pointer-events: none;
}

.word-wrapper.revealing::after {
  animation: revealBar 0.4s var(--ease-out-expo) forwards;
}

@keyframes revealBar {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1.02); transform-origin: left; }
  55% { transform: scaleX(1.02); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* LLM Cursor effect */
.llm-cursor {
  pointer-events: none;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-bright);
  transition: opacity 0.2s, transform 0.1s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 2000;
}

.llm-cursor.active {
  opacity: 1;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .word-wrapper {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .word-wrapper::after {
    display: none !important;
  }

  .header-divider::after,
  .paper-card.super-featured::after,
  body::before {
    animation: none !important;
  }

  .paper-card,
  .toolbar,
  .section-label,
  .site-title,
  .site-subtitle,
  .header-divider,
  .empty-state {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

.proof-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-card);
}

.proof-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a7a1a;
  margin-bottom: 14px;
}

.proof-script {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  tab-size: 4;
  max-height: 500px;
  overflow-y: auto;
  scroll-behavior: smooth;
  transition: border-color var(--duration-normal) var(--ease-in-out-smooth);
}

.proof-script:hover {
  border-color: rgba(200, 150, 12, 0.15);
}

.proof-script::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.proof-script::-webkit-scrollbar-track {
  background: transparent;
}

.proof-script::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 3px;
}

::selection {
  background: rgba(200, 150, 12, 0.25);
  color: var(--text);
}

::-moz-selection {
  background: rgba(200, 150, 12, 0.25);
  color: var(--text);
}

.header-divider::after {
  content: '';
  position: absolute;
  inset: -2px -10px;
  background: inherit;
  filter: blur(8px);
  opacity: 0;
  animation: dividerGlow 4s 1.5s var(--ease-in-out-smooth) infinite;
}

@keyframes shimmer {
  0%, 18% {
    transform: translateX(-35%) translateY(-35%) rotate(0deg);
    opacity: 0;
  }

  38%, 55% {
    opacity: 1;
  }

  75%, 100% {
    transform: translateX(35%) translateY(35%) rotate(0deg);
    opacity: 0;
  }
}

.section-label,
.toolbar,
.site-title,
.site-subtitle,
.header-divider {
  will-change: transform, opacity, filter;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity var(--duration-slow) var(--ease-out-expo),
    transform var(--duration-slow) var(--ease-out-expo),
    filter var(--duration-slow) var(--ease-out-expo);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .site-header {
    padding: 56px 0 36px;
  }

  .site-title {
    font-size: clamp(36px, 10vw, 56px);
  }

  .paper-card {
    padding: 22px 24px;
    min-height: 140px;
  }

  .paper-view {
    padding: 32px 20px;
    min-height: auto;
  }

  .paper-view-frame {
    min-height: 70vh;
  }

  .papers-grid {
    gap: 12px;
  }

  .toolbar-search input {
    min-width: 100%;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  body::before,
  body::after {
    display: none;
  }

  .paper-overlay {
    position: static;
    background: none;
    backdrop-filter: none;
  }

  .paper-view {
    background: white;
    color: black;
    box-shadow: none;
    border: none;
    min-height: auto;
    padding: 24px 0;
    position: static;
    animation: none;
  }

  .paper-view-frame {
    min-height: 0;
    height: auto;
  }

  .paper-view-close {
    display: none;
  }
}
