html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure all interactive elements have smooth transitions for theme changes */
a, button, div, section, header, nav, footer, input, textarea, select {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.3s ease;
}

/* 3D Slideshow Styles */
.perspective-container {
  perspective: 2000px;
}

.slideshow-3d {
  position: relative;
  width: 100%;
  height: 450px;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-3d.active {
  opacity: 1;
  transform: translateZ(0) rotateY(0);
  z-index: 10;
}

.slide-3d.next {
  opacity: 0.3;
  transform: translateX(35%) translateZ(-350px) rotateY(-40deg) scale(0.8);
  z-index: 5;
}

.slide-3d.prev {
  opacity: 0.3;
  transform: translateX(-35%) translateZ(-350px) rotateY(40deg) scale(0.8);
  z-index: 5;
}

.slide-3d.hidden {
  opacity: 0;
  transform: translateZ(-500px);
  z-index: 1;
}

@media (max-width: 1024px) {
  .slideshow-3d {
    height: 350px;
  }
}

@media (max-width: 640px) {
  .slideshow-3d {
    height: 250px;
  }
}

.dark .glass {
  background: rgba(15, 23, 42, 0.65);
}

@keyframes floaty {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-floaty {
  animation: floaty 8s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  animation: fadeUp 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 50%;
  height: 200%;
  transform: rotate(20deg) translateX(-140%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-shine:hover::after,
.btn-shine:focus-visible::after {
  transform: rotate(20deg) translateX(260%);
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2.25rem;
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.article-content h3 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.article-content p {
  margin-top: 1rem;
  color: rgba(15, 23, 42, 0.82);
}

.dark .article-content p {
  color: rgba(226, 232, 240, 0.86);
}

.article-content ul {
  margin-top: 1rem;
  padding-left: 1.2rem;
}

.article-content li {
  margin-top: 0.5rem;
  color: rgba(15, 23, 42, 0.82);
}

.dark .article-content li {
  color: rgba(226, 232, 240, 0.86);
}

.article-content strong {
  color: rgba(15, 23, 42, 0.92);
}

.dark .article-content strong {
  color: rgba(255, 255, 255, 0.92);
}

.article-content code {
  font-size: 0.95em;
  border-radius: 0.5rem;
  padding: 0.12rem 0.35rem;
  background: rgba(15, 23, 42, 0.06);
}

.dark .article-content code {
  background: rgba(255, 255, 255, 0.12);
}

.article-content pre {
  margin-top: 1rem;
  overflow: auto;
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.92);
}

.article-content pre code {
  background: transparent;
  padding: 0;
}

