/* Anthropic-inspired minimal elegance */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background-color: rgba(139, 127, 184, 0.2);
  color: #1a1a1a;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within groups */
article.reveal.visible h3,
article.reveal.visible p,
article.reveal.visible ul,
article.reveal.visible a,
article.reveal.visible .flex,
article.reveal.visible .relative {
  opacity: 1;
  transform: translateY(0);
}

article.reveal h3,
article.reveal p,
article.reveal ul,
article.reveal a,
article.reveal .flex,
article.reveal .relative {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out-expo) 0.1s, transform 0.7s var(--ease-out-expo) 0.1s;
}

article.reveal.visible h3 { transition-delay: 0.1s; }
article.reveal.visible p { transition-delay: 0.15s; }
article.reveal.visible ul { transition-delay: 0.2s; }
article.reveal.visible a { transition-delay: 0.25s; }
article.reveal.visible .flex { transition-delay: 0.05s; }
article.reveal.visible .relative { transition-delay: 0s; }

/* Navbar scroll state */
#navbar.scrolled {
  background-color: rgba(250, 249, 247, 0.95);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* Link hover underline micro-interaction */
a[href^="http"] {
  position: relative;
}

/* Refined focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(139, 127, 184, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle texture for cream background */
body {
  background-image: radial-gradient(circle at 100% 0%, rgba(139, 127, 184, 0.03) 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, rgba(196, 154, 122, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e8e6e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4d2cd;
}
