@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(199, 91, 255, 0.24);
  }
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--dx), var(--dy), 0) rotate(540deg);
    opacity: 0;
  }
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cookieFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes biteAppear {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cookieCrunchAway {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.74) rotate(-8deg);
  }
}

@keyframes cookieIdleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-1px) rotate(-2deg);
  }
}

@keyframes idleBiteBlink {
  0%,
  72%,
  100% {
    opacity: 0;
    transform: scale(0.35);
  }
  80% {
    opacity: 0.45;
    transform: scale(0.9);
  }
}

@keyframes articleImageFadeIn {
  from {
    opacity: 0;
    transform: none;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 80;
  border-radius: 0.5rem;
  background: #ffffff;
  border: 1px solid rgba(143, 0, 255, 0.35);
  color: #5b21b6;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

main h1,
main h2,
main h3 {
  background-image: linear-gradient(135deg, #8f00ff, #4e7bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p {
  text-wrap: pretty;
}

a,
button {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-duration: 180ms;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #c9a3ff;
  outline-offset: 2px;
}

::selection {
  background: rgba(143, 0, 255, 0.22);
}

.card-enter {
  animation: fadeInUp 720ms ease-out both;
}

.follow-btn:hover {
  animation: softPulse 1.2s ease-in-out infinite;
}

.confetti-piece {
  position: fixed;
  z-index: 60;
  width: 8px;
  height: 14px;
  border-radius: 0.5rem;
  animation: confettiFall 1000ms cubic-bezier(0.12, 0.76, 0.22, 1) forwards;
}

.cookie-banner-enter {
  animation: cookieSlideUp 420ms ease-out both;
}

.cookie-banner-exit {
  animation: cookieFadeOut 260ms ease-in forwards;
}

.cookie-icon .cookie-bite {
  opacity: 0;
  transform: scale(0.3);
  transform-origin: center;
}

.cookie-idle .cookie-main {
  animation: cookieIdleFloat 2.4s ease-in-out infinite;
}

.cookie-idle .cookie-bite-1 {
  animation: idleBiteBlink 2.4s ease-in-out infinite 0.05s;
}

.cookie-idle .cookie-bite-2 {
  animation: idleBiteBlink 2.4s ease-in-out infinite 0.2s;
}

.cookie-idle .cookie-bite-3 {
  animation: idleBiteBlink 2.4s ease-in-out infinite 0.35s;
}

.cookie-eating .cookie-main {
  animation: cookieCrunchAway 760ms ease forwards;
}

.cookie-eating .cookie-bite-1 {
  animation: biteAppear 120ms ease forwards 100ms;
}

.cookie-eating .cookie-bite-2 {
  animation: biteAppear 120ms ease forwards 260ms;
}

.cookie-eating .cookie-bite-3 {
  animation: biteAppear 120ms ease forwards 420ms;
}

.gradient-button {
  background-image: linear-gradient(135deg, #8f00ff, #4e7bff);
  border-color: #a966ff;
  color: #fff;
}

.gradient-button:hover {
  background-image: linear-gradient(135deg, #7400d1, #3f68e0);
}

.impact-title {
  font-family: "Righteous", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.logo-wordmark {
  font-family: "Righteous", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1.95rem;
  line-height: 1;
  background-image: linear-gradient(135deg, #8f00ff, #4e7bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sticky-nav {
  position: fixed;
  top: 0.6rem;
  left: 0;
  right: 0;
  z-index: 55;
  pointer-events: none;
}

.sticky-nav .sticky-nav-inner {
  pointer-events: auto;
  margin: 0 auto;
  width: calc(100% - 1.5rem);
  max-width: 72rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.7rem 0.95rem;
  transition: all 240ms ease;
}

.sticky-nav.is-scrolled .sticky-nav-inner {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(143, 0, 255, 0.12);
  padding: 0.5rem 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

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

.placeholder-media {
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.2);
  background:
    radial-gradient(circle at 20% 20%, rgba(143, 0, 255, 0.2), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(78, 123, 255, 0.22), transparent 40%),
    linear-gradient(135deg, rgba(236, 243, 255, 0.95), rgba(215, 230, 255, 0.95), rgba(200, 181, 255, 0.92));
}

.blog-media-link {
  display: block;
}

.blog-media-frame {
  overflow: hidden;
  position: relative;
}

.blog-media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0));
}

.blog-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 280ms ease;
}

.blog-media-link:hover .blog-media-image,
.blog-media-link:focus-visible .blog-media-image {
  transform: scale(1.03);
}

.filter-chip {
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #5b21b6;
  font-size: 0.76rem;
  padding: 0.35rem 0.72rem;
  transition: all 160ms ease;
}

.filter-chip:hover {
  border-color: rgba(143, 0, 255, 0.5);
}

.filter-chip.active {
  background: linear-gradient(135deg, #8f00ff, #4e7bff);
  border-color: transparent;
  color: #fff;
}

#readingProgress {
  transition: width 120ms linear;
}

.article-layout {
  display: grid;
  gap: 1rem;
}

.article-media-placeholder {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.24);
  background:
    radial-gradient(circle at 20% 20%, rgba(143, 0, 255, 0.18), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(78, 123, 255, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(236, 243, 255, 0.95), rgba(215, 230, 255, 0.95), rgba(200, 181, 255, 0.92));
}

.article-media-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0));
}

.article-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: articleImageFadeIn 540ms ease-out both;
}

.article-media-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.article-side-nav {
  display: none;
}

.side-nav-panel {
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.18);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  padding: 0.7rem;
}

.side-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #4c1d95;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.side-nav-btn .label {
  opacity: 0.84;
  transition: opacity 160ms ease;
}

.side-nav-btn:hover {
  border-color: rgba(143, 0, 255, 0.45);
  background: #fff;
}

.side-nav-btn:hover .label {
  opacity: 1;
}

.side-nav-btn.is-primary {
  border-color: rgba(143, 0, 255, 0.35);
  background: linear-gradient(135deg, rgba(143, 0, 255, 0.14), rgba(78, 123, 255, 0.14));
}

.side-nav-btn.is-disabled {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(248, 250, 252, 0.92);
  color: #94a3b8;
}

.side-nav-tags {
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(143, 0, 255, 0.14);
}

.side-nav-tags .tag-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.side-nav-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.side-nav-tag {
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.2);
  background: rgba(255, 255, 255, 0.88);
  color: #6b21a8;
  font-size: 0.7rem;
  padding: 0.23rem 0.52rem;
}

.side-nav-tag:hover {
  border-color: rgba(143, 0, 255, 0.42);
}

.side-nav-details {
  padding: 0;
}

.side-nav-details .detail-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #64748b;
}

.side-nav-details .detail-value {
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: #1e293b;
}

.article-mobile-nav {
  display: none;
}

.mobile-nav-panel {
  margin: 0 auto;
  width: min(560px, calc(100% - 1rem));
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.2);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  padding: 0.42rem;
}

.mobile-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #4c1d95;
  padding: 0.45rem 0.62rem;
  font-size: 0.76rem;
}

.mobile-nav-btn.is-primary {
  border-color: rgba(143, 0, 255, 0.34);
  background: linear-gradient(135deg, rgba(143, 0, 255, 0.14), rgba(78, 123, 255, 0.14));
}

.mobile-nav-btn.is-disabled {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(248, 250, 252, 0.92);
  color: #94a3b8;
}

.tooltip-term {
  position: relative;
  cursor: help;
  border-bottom: 1px dashed rgba(143, 0, 255, 0.65);
  color: #6b21a8;
}

.tooltip-term::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(260px, 80vw);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tooltip-term:hover::after,
.tooltip-term:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.prompt-box {
  position: relative;
  margin-top: 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(143, 0, 255, 0.24);
  background: #0f172a;
  color: #e2e8f0;
  overflow: hidden;
}

.prompt-box pre {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  font-size: 0.83rem;
  line-height: 1.5;
}

.copy-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(201, 163, 255, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
}

.copy-btn:hover {
  border-color: rgba(201, 163, 255, 0.75);
}

.blog-card .placeholder-media {
  border-radius: 0.5rem 0.5rem 0 0;
}

body.pt-24 {
  padding-top: 6.5rem;
}

main > section + section {
  margin-top: 1.5rem;
}

main p + p {
  margin-top: 0.85rem;
}

main h1 {
  line-height: 1.12;
}

main h2 {
  line-height: 1.25;
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 5.5rem;
  }

  .article-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0.6rem;
    z-index: 62;
    display: block;
  }
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
    gap: 1.25rem;
  }

  .article-side-nav {
    display: block;
    position: sticky;
    top: 6.5rem;
  }
}

@media (max-width: 640px) {
  body.pt-24 {
    padding-top: 7.75rem;
  }

  .sticky-nav .sticky-nav-inner > div {
    align-items: flex-start;
    row-gap: 0.45rem;
  }

  .sticky-nav .sticky-nav-inner > div > div {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
  }
}

@media (min-width: 640px) {
  main > section + section {
    margin-top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-enter,
  .follow-btn:hover,
  .cookie-banner-enter,
  .cookie-idle .cookie-main,
  .cookie-idle .cookie-bite-1,
  .cookie-idle .cookie-bite-2,
  .cookie-idle .cookie-bite-3,
  .cookie-eating .cookie-main,
  .cookie-eating .cookie-bite-1,
  .cookie-eating .cookie-bite-2,
  .cookie-eating .cookie-bite-3,
  .article-hero-image {
    animation: none !important;
  }

  .confetti-piece {
    animation: none;
    opacity: 0;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blog-media-image {
    transform: none !important;
    transition: none !important;
  }
}
