/* Modern Dark "Pro" Hacker Theme with WOW Effect */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* --- ANIMATIONS --- */
@keyframes gridMove {
  0% { background-position: 0 0, 25px 25px, 0 0; }
  100% { background-position: 100px 100px, 125px 125px, 0 0; }
}

@keyframes ambientPulse {
  0% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.6; transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

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

@keyframes titleReveal {
  from { opacity: 0; transform: scale(0.9); letter-spacing: -2px; }
  to { opacity: 1; transform: scale(1); letter-spacing: normal; }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 20px rgba(96, 165, 250, 0.1), 0 0 0 1px rgba(96, 165, 250, 0.1) inset; }
  50% { box-shadow: 0 0 40px rgba(96, 165, 250, 0.3), 0 0 0 1px rgba(96, 165, 250, 0.3) inset; }
  100% { box-shadow: 0 0 20px rgba(96, 165, 250, 0.1), 0 0 0 1px rgba(96, 165, 250, 0.1) inset; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* --- BASE STYLES --- */

body {
  background-color: #020204;
  /* Dual Layer Cyber Grid + Ambient Light */
  background-image: 
    linear-gradient(rgba(96, 165, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(167, 139, 250, 0.03) 2px, transparent 2px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.03) 2px, transparent 2px),
    radial-gradient(circle at center, #0f172a 0%, #000000 100%);
  background-size: 50px 50px, 50px 50px, 150px 150px, 150px 150px, 100% 100%;
  animation: gridMove 8s linear infinite;
  
  color: #e0e0e0;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Pseudo-element for extra glow and "life" */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.05), transparent 70%);
    pointer-events: none;
    animation: ambientPulse 10s ease-in-out infinite;
    z-index: -1;
}

/* --- SLIDE STYLING --- */

/* Hovercraft default class for slides is 'step' */
.step {
  width: 1800px;
  min-height: 1000px;
  padding: 80px;
  
  /* Glass/Card effect */
  background: rgba(15, 15, 18, 0.85); /* More transparent for background effect */
  backdrop-filter: blur(10px); /* Blurs the grid behind the card */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  
  margin: 0;
  box-sizing: border-box;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth transitions */
}

/* --- ACTIVE STATE (THE WOW) --- */
/* .present is the class impress.js adds to the current slide */
.step.present {
  border-color: rgba(96, 165, 250, 0.6);
  animation: pulseGlow 3s infinite;
  z-index: 100;
}

/* Hide inactive slides more to focus on the active one */
.step:not(.present) {
  opacity: 0.3;
  transform: scale(0.95); /* Slightly smaller when not active */
  filter: grayscale(80%);
}
.step.future, .step.past {
    opacity: 0.3;
}

/* --- TYPOGRAPHY & CONTENT --- */

.step h1, .step h2, .step h3 {
  margin-bottom: 50px;
  font-size: 3.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -1px;
  
  /* Gradient Text */
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* Initial state for animation */
  opacity: 0; 
}

.step.present h1, .step.present h2, .step.present h3 {
  animation: titleReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.step h1 {
    /* Main Title Special Gradient */
    background: linear-gradient(90deg, #60a5fa, #c084fc, #f472b6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleReveal 0.8s forwards, gradientShift 5s linear infinite;
}

.step p, .step li {
  margin: 25px 0;
  font-size: 2.2em;
  line-height: 1.5;
  color: #c0c0c0;
  max-width: 1500px;
  
  opacity: 0; /* Hidden by default */
}

.step.present p, .step.present li {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered animation for lists using nth-child would be ideal, 
   but generic delays work well enough broadly */
.step.present p { animation-delay: 0.2s; }
.step.present ul { opacity: 1; } /* Container shows instantly */
.step.present li:nth-child(1) { animation-delay: 0.3s; }
.step.present li:nth-child(2) { animation-delay: 0.4s; }
.step.present li:nth-child(3) { animation-delay: 0.5s; }
.step.present li:nth-child(4) { animation-delay: 0.6s; }

.step strong {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.step ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.step li {
    padding-left: 50px;
    position: relative;
}

.step li::before {
  content: '>';
  color: #60a5fa;
  font-weight: bold;
  position: absolute;
  left: 0;
  text-shadow: 0 0 10px #60a5fa;
}

/* --- IMAGES & DIAGRAMS --- */
.step img {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    opacity: 0;
}

.step.present img {
    opacity: 1;
    animation: fadeInUp 1s ease-out forwards, float 6s ease-in-out infinite;
}

.step img.diagram {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 30px;
  cursor: zoom-in; /* Change cursor to indicate clickability */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step img.diagram:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(96, 165, 250, 0.4);
}

/* --- CROPPED PREVIEW IMAGE --- */
.step img.preview-crop {
    max-height: 350px; /* Even shorter for better focus */
    max-width: 600px;  /* Narrower preview */
    width: auto;
    object-fit: cover; 
    object-position: center; /* FOCUS ON THE CENTER */
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%); /* Fade top AND bottom */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    border: none;
    background: none;
    box-shadow: none;
}

/* Links */
a {
    color: #60a5fa;
    text-decoration: none;
    position: relative;
}

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

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

/* --- ZOOM OVERLAY (LIGHTBOX) --- */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Ignore clicks when hidden */
    backdrop-filter: blur(5px);
}

.zoom-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.zoom-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    box-shadow: 0 0 50px rgba(96, 165, 250, 0.5);
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: contain;
    /* Reset animations and special styles from standard slide images */
    animation: none;
    opacity: 1; 
    mask-image: none; /* Remove fade effect in zoom */
    -webkit-mask-image: none;
}

.zoom-overlay.active img {
    transform: scale(1);
}
