/* ============================================================
   Paper detail page — the landing page's horizontal sheet
   mechanic (vertical scroll → horizontal travel), plus a dock
   in the spirit of 2023.rauno.me.
   ============================================================ */

html {
  overscroll-behavior: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}

/* sheet-on-canvas contrast, like the landing page */
html.light,
html.light body {
  background: var(--colors-gray4);
}
html.dark,
html.dark body {
  background: var(--colors-gray1);
}

.ghost {
  pointer-events: none;
  user-select: none;
}

.center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sheets {
  width: 1200px;
  height: 720px;
  will-change: transform;
}

@keyframes fadeSheets {
  to { opacity: 1; }
}

.sheet-frame {
  outline: 0;
  width: 1200px;
  height: 720px;
}
.sheet-frame:not([data-first]) {
  position: absolute;
  top: 0;
  opacity: 0;
  animation: fadeSheets 0.35s ease-in-out 0.8s forwards;
}
.paper-root[data-cancel-animation="true"] .sheet-frame {
  animation-delay: 0s;
}

.sheet {
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.sheet-label {
  font-size: 14px;
  color: var(--colors-gray11);
  position: absolute;
  top: -28px;
  transform-origin: top left;
}

/* ---- persistent title (appears once the title sheet is left) ---- */
.sticky-title {
  position: fixed;
  top: 46px; /* second line, under the breadcrumb — the old notes 24/46 stack */
  left: 28px;
  max-width: 38vw;
  font-size: 14px;
  line-height: 20px;
  color: var(--colors-gray11);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 15;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 250ms ease, transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.sticky-title[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* ---- title sheet ---- */
.sheet-title {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}
.eyebrow {
  font-size: 14px;
  color: var(--colors-gray11);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .index-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  border-radius: var(--radii-round);
  font-size: 12px;
  padding: 0 6px;
  background: #fff;
  color: #000;
  box-shadow: inset 0 0 0 1px var(--colors-gray6);
}
.sheet-title h1 {
  font-size: 68px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--colors-gray12);
}
.sheet-title h1[data-long] {
  font-size: 54px;
}

/* ---- authors sheet ---- */
.sheet-authors {
  padding: 64px;
  display: flex;
  align-items: center;
}
.authors-flow {
  color: var(--colors-gray11);
  letter-spacing: -0.01em;
}
.authors-flow[data-count="few"] { font-size: 48px; line-height: 1.4; }
.authors-flow[data-count="some"] { font-size: 40px; line-height: 1.45; }
.authors-flow[data-count="many"] { font-size: 32px; line-height: 1.5; }
.author-name {
  display: inline-block;
  white-space: nowrap;
}
.author-me {
  color: var(--colors-gray12);
  font-weight: 500;
}

/* ---- venue sheet ---- */
.sheet-venue {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.venue-big {
  font-size: 150px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--colors-gray12);
}
.venue-big[data-long] {
  font-size: 96px;
}
.venue-year {
  font-size: 68px;
  color: var(--colors-gray9);
}
.venue-full {
  font-size: 16px;
  color: var(--colors-gray11);
  max-width: 720px;
  line-height: 1.5;
}

/* ---- abstract sheet ---- */
.sheet-abstract {
  padding: 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sheet-heading {
  font-size: 14px;
  color: var(--colors-gray11);
}
.abstract-text {
  font-size: 19px;
  line-height: 1.55;
  color: var(--colors-gray12);
  column-count: 2;
  column-gap: 48px;
  flex: 1;
}
.abstract-text::first-letter {
  font-size: 300%;
  float: left;
  line-height: 0.85;
  padding-right: 10px;
  font-family: var(--fonts-serif);
}

/* ---- identity sheet: the paper's mirror glass, full bleed ---- */
.sheet-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}
.identity-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.identity-chip {
  position: absolute;
  left: 50px;
  bottom: 44px;
  font-family: var(--fonts-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---- bibtex sheet (always the dark "code" surface) ---- */
.sheet-bibtex {
  background: hsl(0 0% 11%);
  padding: 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sheet-bibtex .sheet-heading {
  color: hsl(0 0% 62.8%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-bibtex pre {
  margin: 0;
  font-family: var(--fonts-mono);
  font-size: 15px;
  line-height: 1.7;
  color: hsl(0 0% 93%);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}
.copy-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: hsl(0 0% 17.9%);
  color: hsl(0 0% 93%);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: background 150ms ease;
}
.copy-btn:hover {
  background: hsl(0 0% 24.3%);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--colors-focus);
  outline-offset: 2px;
}

/* ---- dock: shared component — styles in dock.css, engine in dock.js ---- */

/* ---- coarse pointers: reading type inside the fixed sheets ----
   the sheets stay 1200x720 and scale to the phone; these sizes are
   chosen so landscape reads unaided and portrait reads with a pinch */
@media (pointer: coarse) {
  html { touch-action: pinch-zoom; } /* nothing scrolls: sideways swipes are travel.js's, pinch stays free */
  .eyebrow { font-size: 24px; }
  .eyebrow .index-chip { min-width: 40px; height: 30px; font-size: 18px; }
  .abstract-text { font-size: 24px; line-height: 1.5; }
  .venue-full { font-size: 28px; max-width: 900px; }
  .authors-flow[data-count="few"] { font-size: 64px; }
  .authors-flow[data-count="some"] { font-size: 56px; }
  .authors-flow[data-count="many"] { font-size: 44px; }
  .sheet-bibtex pre { font-size: 24px; line-height: 1.55; }
  .copy-btn { height: 48px; padding: 0 22px; font-size: 20px; }
}
