/* ═══════════════════════════════════════════════════════════════════════════
   ZsinTech — Motion System
   Subtle, intentional animation inspired by Linear/Apple
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Page sections stagger in */
.public-main > section,
.public-main > .dash-hero,
.public-main > .dash-row,
.public-main > .dash-panel {
  animation: fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.public-main > *:nth-child(1) { animation-delay: 0s; }
.public-main > *:nth-child(2) { animation-delay: 0.06s; }
.public-main > *:nth-child(3) { animation-delay: 0.12s; }
.public-main > *:nth-child(4) { animation-delay: 0.16s; }
.public-main > *:nth-child(5) { animation-delay: 0.2s; }
.public-main > *:nth-child(6) { animation-delay: 0.24s; }

/* Cards stagger */
.project-tile,
.activity-magazine-card,
.masonry-card,
.popsci-card,
.journalism-card,
.journalism-home-card,
.article-card,
.book-card,
.hub-card,
.stat-card {
  animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-tile:nth-child(1), .activity-magazine-card:nth-child(1), .masonry-card:nth-child(1), .popsci-card:nth-child(1) { animation-delay: 0.04s; }
.project-tile:nth-child(2), .activity-magazine-card:nth-child(2), .masonry-card:nth-child(2), .popsci-card:nth-child(2) { animation-delay: 0.08s; }
.project-tile:nth-child(3), .activity-magazine-card:nth-child(3), .masonry-card:nth-child(3), .popsci-card:nth-child(3) { animation-delay: 0.12s; }
.project-tile:nth-child(4), .activity-magazine-card:nth-child(4), .masonry-card:nth-child(4), .popsci-card:nth-child(4) { animation-delay: 0.16s; }
.project-tile:nth-child(5), .activity-magazine-card:nth-child(5), .masonry-card:nth-child(5), .popsci-card:nth-child(5) { animation-delay: 0.2s; }
.project-tile:nth-child(6), .activity-magazine-card:nth-child(6), .masonry-card:nth-child(6), .popsci-card:nth-child(6) { animation-delay: 0.24s; }

/* Hover image zoom */
@media (hover: hover) {
  .masonry-card-link:hover .masonry-card-image,
  .masonry-card-link:hover .masonry-card-image-wrap img,
  .popsci-card-link:hover .popsci-card-image,
  .popsci-card-link:hover .popsci-card-image-wrap img,
  .journalism-card-link:hover .journalism-card-image-wrap img,
  .journalism-home-card:hover .journalism-home-image img,
  .project-tile:hover .project-tile-img img,
  .activity-magazine-card:hover .activity-magazine-img img {
    transform: scale(1.04);
  }

  .tile:hover .tile-thumb img {
    transform: scale(1.08);
  }
}

.tile-thumb img,
.masonry-card-image,
.masonry-card-image-wrap img,
.popsci-card-image,
.popsci-card-image-wrap img,
.journalism-card-image-wrap img,
.journalism-home-image img,
.project-tile-img img,
.activity-magazine-img img {
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Admin stagger */
.admin-main > section,
.admin-main > .notebook-grid,
.admin-main > .note-list,
.admin-main > .dashboard-quick-links,
.admin-main > .stats-grid {
  animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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