/* Layered paper: shapes are CSS clip-path only; no raster textures. */

.paper-card {
  position: relative;
  padding: 1.25rem 1.4rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}
.paper-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14), 0 14px 26px rgba(0, 0, 0, 0.12); }

.story { position: relative; max-width: 68ch; }

/* Hero: tilted terracotta sheet behind a white sheet, sage torn strip below. */
#hero { position: relative; min-height: min(78vh, 640px); padding-bottom: 6rem; }
.hero-copy { position: relative; z-index: 2; max-width: 34rem; padding-top: 3rem; }
.hero-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sheet { position: absolute; will-change: transform; }
.sheet--terracotta { right: 4%; top: 12%; width: min(44%, 420px); aspect-ratio: 5 / 4; background: var(--terracotta); transform: rotate(-3deg); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18); }
.sheet--sage { left: -2%; bottom: 0; width: 104%; height: 64px; background: var(--sage); }
.torn { clip-path: polygon(0 4%, 8% 0, 20% 3%, 34% 0, 50% 3%, 66% 0, 82% 3%, 100% 0, 100% 96%, 88% 100%, 70% 97%, 52% 100%, 34% 97%, 16% 100%, 0 96%); }
.sheet--sage.torn { clip-path: polygon(0 40%, 15% 20%, 32% 45%, 50% 15%, 68% 40%, 85% 18%, 100% 38%, 100% 100%, 0 100%); }

.chapter-label::before {
  content: '';
  display: inline-block;
  width: 2.5rem; height: 0.5rem; margin-right: 0.75rem;
  background: var(--sage);
  clip-path: polygon(0 40%, 20% 0, 45% 60%, 70% 10%, 100% 50%, 100% 100%, 0 100%);
}

.pub-title { margin-bottom: 0.4rem; }
.pub-meta { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.pub-logos { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.6rem; }
.pub-logo { height: 22px; width: auto; }
.pub-doi { font-size: 0.85rem; display: inline-block; margin-left: 0.5rem; }
.badge--award { display: inline-block; padding: 0.15rem 0.6rem; font-size: 0.8rem; background: var(--terracotta-deep); color: var(--white); border-radius: 2px; }

/* Scroll reveal: content is only hidden once JS has started (.js-reveal). */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .paper-card, .paper-card:hover { transition: none; transform: none; }
  .sheet { transform: none; will-change: auto; }
}

@media (max-width: 640px) {
  .sheet--terracotta { display: none; }
  .hero-copy { padding-top: 1rem; }
  #hero { padding-bottom: 6rem; }
}

/* Photos on paper sheets */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; background: var(--paper-deep); }
.photo { background: var(--white); padding: 10px 10px 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.1); }
.credit { margin-top: 6px; font-size: 0.75rem; color: var(--ink-soft); }
.photo-placeholder { display: flex; align-items: center; justify-content: center; min-height: 160px; padding: 1rem; text-align: center; font-size: 0.85rem; color: var(--ink-soft); background: var(--paper-deep); }
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.paper-card .photo { margin-top: 0.75rem; box-shadow: none; padding: 0; background: none; }
.hero-photo { right: 8%; top: 16%; width: min(38%, 380px); transform: rotate(2deg); z-index: 1; }
.pub-logo--text { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.5rem; border: 1px solid var(--ink-soft); color: var(--ink-soft); border-radius: 2px; }
@media (max-width: 640px) { .hero-photo { position: relative; right: auto; top: auto; width: 82%; margin: 2rem 0 0 auto; } }
@media (prefers-reduced-motion: reduce) { .hero-photo { transform: none; } }
.photo-row img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Venue logos: the ACM diamond is square, so it needs more height than the wide Springer wordmark. */
.pub-logo--springer { height: 38px; }
.pub-logo--acm { height: 38px; }
.pub-logo--ueh { height: 36px; }
.pub-logo--bk { height: 36px; }
.pub-logo--yzu { height: 36px; }
.pub-logo--ctu { height: 36px; }
.pub-logo--eiu { height: 30px; }
.pub-logo--iuh { height: 40px; }
.pub-logos { align-items: center; }

/* Portrait */
.eyebrow { display: flex; align-items: center; gap: 0.75rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; filter: brightness(1.25) contrast(1.05); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.portrait { max-width: 220px; margin: 0 0 1.25rem; }
.portrait img { aspect-ratio: 1; object-fit: cover; filter: brightness(1.25) contrast(1.05); }
.paper-card .photo { margin-top: 0.75rem; }
.paper-card .photo + .photo { margin-top: 1rem; }

/* Chapters 1 and 2: text beside photos / lab cards, using the whole container */
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 3rem; align-items: start; }
.chapter-grid .story { max-width: none; }
.chapter-aside { display: grid; gap: 1.25rem; }
.photo-mosaic { grid-template-columns: 1fr 1fr; }
.photo-mosaic .photo:first-child { grid-column: 1 / -1; }
.photo-mosaic img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo-mosaic .photo:first-child img { aspect-ratio: 16 / 9; }
.lab-card h3 { margin-top: 0.75rem; }
.lab-logo { display: inline-flex; align-items: center; height: 56px; }
.lab-logo img { height: 100%; width: auto; }
.lab-logo--dark { background: var(--navy); padding: 0 0.9rem; border-radius: 3px; height: 44px; }
.lab-logo--dark img { height: 26px; }
@media (max-width: 899px) { .chapter-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Indexing note under the publication cards */
.indexing { margin-top: 1.75rem; padding: 1rem 1.25rem; border-left: 4px solid var(--sage); background: rgba(255, 253, 249, 0.6); max-width: 60ch; }
.indexing h4 { margin: 0 0 0.5rem; }
.indexing ul { margin: 0; padding-left: 1.1rem; }
.indexing li { margin: 0.25rem 0; }

/* Contact profile links */
.profiles { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.profile-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; background: var(--white); border-radius: 3px; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06); }
.profile-link img { width: 24px; height: 24px; }
.profile-link:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .profile-link:hover { transform: none; } }
