@import url('https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #050509;
  --bg-gradient: radial-gradient(circle at center, #1a0b2e 0%, #050509 100%);
  --text-color: #F5F5F5;
  --accent-color: #9A54FF;
  --accent-secondary: #FF54B0;
  --accent-gradient: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
  --secondary-color: #7A7A8C;
  --font-title: 'Funnel Display', sans-serif;
  --font-text: 'Google Sans Code', 'Fira Code', 'Noto Sans Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-gradient);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-text);
  line-height: 1.5;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
}

.bg-blob {
  position: absolute;
  filter: blur(120px);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.4;
  animation: levitate-blob 10s ease-in-out infinite alternate;
}

.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; max-width: 600px; max-height: 600px; background: rgba(154, 84, 255, 0.25); }
.blob-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; max-width: 500px; max-height: 500px; background: rgba(255, 84, 176, 0.2); animation-direction: alternate-reverse; }

/* Typography */
h1, h2, h3 {
  font-family: var(--font-title);
  margin-bottom: clamp(1rem, 3vh, 2rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(to right, #ffffff, #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(154, 84, 255, 0.3);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(to right, #ffffff, #fbcfe8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p, li, a {
  font-size: clamp(0.9rem, 2vh, 1.15rem);
  color: var(--text-color);
  margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  position: relative;
  padding-left: 1.5rem;
}

li::before {
  content: '>';
  color: var(--accent-color);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  top: 0;
  font-family: var(--font-title);
  font-weight: 800;
}

main a {
  color: var(--accent-color);
  text-decoration: none;
  position: relative;
  font-weight: 500;
}

main a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

main a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Layout */
.slide-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

header {
  padding: 0.75rem 1.5rem;
  background: rgba(5, 5, 9, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: inline-block;
  margin: 0 auto;         /* Centered at top */
  align-self: center;     /* Centered horizontally in column */
  z-index: 10;
}

header span {
  font-size: 0.8rem;
  color: var(--secondary-color);
  letter-spacing: 1px;
  text-transform: uppercase;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 0;
  min-height: 0;
}

/* Centered Layout For Intro Pages */
.text-center {
  width: 100%;
  text-align: center;
  align-items: center;
}
.text-center li { padding-left: 0; }
.text-center li::before { display: none; }

.subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: #d8b4fe;
  margin-bottom: 2rem;
  font-family: var(--font-title);
  text-align: inherit;
}

.author-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

/* Content Grid utilities */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* Perspective / Hover animations */
.perspective-container {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.perspective-3d {
  transform-style: preserve-3d;
  transform: rotateY(-12deg) rotateX(8deg) scale(0.95);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  box-shadow: -20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  border-radius: 24px;
  width: 100%;
  animation: autoHoverAnim 15s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.perspective-3d:hover {
  transform: rotateY(-2deg) rotateX(2deg) scale(1) translateZ(30px);
  box-shadow: -5px 10px 30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 40px rgba(154,84,255,0.3);
  animation-play-state: paused;
}

@keyframes autoHoverAnim {
  0%, 75% {
    transform: rotateY(-12deg) rotateX(8deg) scale(0.95);
    box-shadow: -20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  }
  80%, 95% {
    transform: rotateY(-2deg) rotateX(2deg) scale(1) translateZ(30px);
    box-shadow: -5px 10px 30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 40px rgba(154,84,255,0.3);
  }
  100% {
    transform: rotateY(-12deg) rotateX(8deg) scale(0.95);
    box-shadow: -20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  }
}

.levitate { animation: levitate 6s ease-in-out infinite; }
@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes levitate-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

/* Cinematic Transitions */
main > * {
  animation: cinematicFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}
main > *:nth-child(1) { animation-delay: 0.1s; }
main > *:nth-child(2) { animation-delay: 0.2s; }
main > *:nth-child(3) { animation-delay: 0.3s; }
main > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes cinematicFadeIn {
  0% {
    opacity: 0;
    transform: perspective(1200px) translate3d(0, 30px, -50px) rotateX(-5deg);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) translate3d(0, 0, 0) rotateX(0deg);
    filter: blur(0);
  }
}

li {
  opacity: 0;
  animation: cinematicFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
li:nth-child(1) { animation-delay: 0.2s; }
li:nth-child(2) { animation-delay: 0.3s; }
li:nth-child(3) { animation-delay: 0.4s; }
li:nth-child(4) { animation-delay: 0.5s; }
li:nth-child(5) { animation-delay: 0.6s; }

/* NEW Stepper Footer */
footer {
  width: 100%;
  padding: 1.5rem 0 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

.stepper-bg-line, .stepper-fill-line {
  position: absolute;
  top: 12px;
  left: 4%;
  right: 4%;
  height: 2px;
  background: rgba(122, 122, 140, 0.2);
  z-index: 0;
}

.stepper-fill-line {
  background: var(--accent-gradient);
  right: auto;
  transition: width 0.4s ease;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  z-index: 1;
  width: calc(100% / 12);
  cursor: pointer;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2a2a35;
  border: 4px solid var(--bg-color); /* To overlay the line nicely */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.step-circle svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-label {
  margin-top: 6px;
  color: var(--secondary-color);
  font-size: clamp(0.55rem, 1vw, 0.75rem);
  font-family: var(--font-title);
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s ease;
}

/* Completed Steps */
.step-item.completed .step-circle {
  background: rgba(154, 84, 255, 0.3);
  color: var(--accent-color);
}
.step-item.completed .step-circle svg {
  opacity: 1;
  fill: var(--accent-color);
  stroke: var(--accent-color);
}

/* Active Step */
.step-item.active .step-circle {
  background: var(--accent-color);
  box-shadow: 0 0 0 3px var(--bg-color), 0 0 0 5px rgba(154, 84, 255, 0.5); /* Outer dashed-like glow */
}
.step-item.active .step-circle::after {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(154, 84, 255, 0.8);
  animation: rotate 6s linear infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.step-item.active .step-label {
  color: #fff;
  font-weight: bold;
}

.step-item:hover .step-circle {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(154, 84, 255, 0.4);
}

.step-item:hover .step-label {
  color: #fff;
}

@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .slide-container { padding: 1rem; }
  .perspective-3d { transform: rotateY(0) rotateX(0) scale(1); }
  .step-label { display: none; } /* Hide labels on mobile to avoid crowding */
}

/* Grid Variants for Variety */
.content-grid.reverse {
  direction: rtl;
}
.content-grid.reverse > * {
  direction: ltr;
}
@media (max-width: 768px) {
  .content-grid.reverse {
    direction: ltr; /* Reset on mobile so text is still on top */
  }
}

.perspective-3d.alt-angle {
  transform: rotateY(12deg) rotateX(8deg) scale(0.95);
  box-shadow: 20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  animation: autoHoverAnimAlt 15s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.perspective-3d.alt-angle:hover {
  transform: rotateY(2deg) rotateX(2deg) scale(1) translateZ(30px);
  box-shadow: 5px 10px 30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 40px rgba(154,84,255,0.3);
}

@keyframes autoHoverAnimAlt {
  0%, 75% {
    transform: rotateY(12deg) rotateX(8deg) scale(0.95);
    box-shadow: 20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  }
  80%, 95% {
    transform: rotateY(2deg) rotateX(2deg) scale(1) translateZ(30px);
    box-shadow: 5px 10px 30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 40px rgba(154,84,255,0.3);
  }
  100% {
    transform: rotateY(12deg) rotateX(8deg) scale(0.95);
    box-shadow: 20px 30px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
  }
}
