/* ===== Zahra Khazaei — shared site styles ===== */

/* Justified body text on larger screens */
@media (min-width: 640px) {
  main p, main li { text-align: justify; text-justify: inter-word; hyphens: auto; }
}

/* Smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* Nav: subtle shadow once the page is scrolled */
header { transition: box-shadow .3s ease, background-color .3s ease; }
header.nav-scrolled { box-shadow: 0 4px 20px -8px rgba(15, 23, 42, .18); }

/* Scroll-reveal: elements start hidden, then ease in when scrolled into view */
.reveal-init { opacity: 0; transform: translateY(18px); }
.reveal-in   { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }

/* Hero entrance animation on load */
@keyframes zk-hero { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-in > * { opacity: 0; animation: zk-hero .7s cubic-bezier(.16,1,.3,1) forwards; }
.hero-in > *:nth-child(1) { animation-delay: .05s; }
.hero-in > *:nth-child(2) { animation-delay: .15s; }
.hero-in > *:nth-child(3) { animation-delay: .25s; }
.hero-in > *:nth-child(4) { animation-delay: .35s; }
.hero-in > *:nth-child(5) { animation-delay: .45s; }
.hero-in > *:nth-child(6) { animation-delay: .55s; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-init { opacity: 1 !important; transform: none !important; }
  .hero-in > * { opacity: 1 !important; animation: none !important; }
}
