:root {
  --bg: #f2f2f2;
  --paper: #ffffff;
  --text: #111;
  --muted: #666;
  --link: #0033aa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --paper: #1a1a1a;
    --text: #e6e6e6;
    --muted: #aaa;
    --link: #7aa2ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", "Noto Serif", serif;
}

.viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
}

/* A4 page */
.page {
  /* Fixed A4 dimensions on desktop (794px × 1123px at 96dpi)
     but allow proportional downscaling on narrow viewports */
  width: 794px;
  aspect-ratio: 210 / 297;
  max-width: calc(100vw - 2rem);
  /* max-height: calc(100vh - 2rem); */
  background: var(--paper);
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: auto;
}

.paper-header {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 2rem;
}

.meta {
  color: var(--muted);
  margin: 0.2rem;
}

.abstract {
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.content h2 {
  font-size: 1.2rem;
  margin-top: 0;
}

.paper-list {
  padding-left: 0rem;
  list-style-type: none;
}

.paper-list li {
  margin-bottom: 0.8rem;
}

.paper-list a {
  color: inherit;
  text-decoration: none;
}

.paper-list a:hover {
  text-decoration: underline;
}

.date {
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.paper-footer {
  position: absolute;
  bottom: 1.5cm;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
