/* VARIABLES */
:root {
  --bg-main: #0d0d0d;
  --bg-dark: #0a0a0a;
  --accent-red: #ff6b6b;
  --accent-red-light: rgba(255,107,107,0.2);
  --text-main: #ffffff;
  --text-muted: #888;
}

/* RESET */
body {
  margin: 0;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-main), #121212);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* BACKGROUND GLOW */
.bg-glow {
  position: fixed;
  top: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,107,107,0.15), transparent 70%);
  filter: blur(100px);
  z-index: 9999;
  animation: floatGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.bg-glow.following {
  animation: none;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(200px, 150px); }
}

/* HERO */
.hero {
  position: relative;
  text-align: center;
  padding: 160px 20px 80px;
  overflow: hidden;
}

.hero h1 {
  font-size: 64px;
  margin: 0;
}

.subtitle {
  margin-top: 15px;
  font-size: 18px;
  color: var(--text-muted);
}

/* HERO VIDEO */
.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

/* PROJECTS */
.projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 60px 20px 80px;
}

.section-title {
  font-size: 24px;
  color: var(--accent-red);
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent-red-light);
  margin: 10px auto;
}

/* PROJECT CARD */
.project {
  position: relative;
  background: #ffffff05;
  border-radius: 14px;
  overflow: visible;
  max-width: 420px;
  text-align: center;
  transition: all 0.3s ease;
}

.project-link {
  cursor: pointer;
  display: block;
}

.project img {
  width: 100%;
  display: block;
  border-radius: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project:hover img {
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transform: scale(1.03);
}

.project:hover {
  transform: translateY(-5px);
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,107,107,0.2), transparent);
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
}

.project:hover::before {
  opacity: 1;
}

.project h3 {
  margin: 12px 0;
}

/* BUTTONS */
.project-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.btn {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  cursor: pointer;
  border: none;
  font-size: 14px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.btn-primary {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.btn-secondary {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.btn:hover {
  background: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.5s;
  z-index: 10000;
}

.modal.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 90vw;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  transform: scale(0.8);
  transition: 0.5s;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal video {
  width: 100%;
  height: 100%;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
}

.close:hover {
  color: var(--accent-red);
  text-shadow: 0 0 20px var(--accent-red);
}

/* STEPS PAGE */
#details {
  background: var(--bg-dark);
  padding: 60px 20px;
  text-align: center;
}

/* STEPS HORIZONTAL SCROLL */
#details {
  background: var(--bg-dark);
  padding: 60px 20px;
  text-align: center;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding: 0 10px;
}

.carousel-viewport {
  width: 100%;
  max-width: 1600px;
  overflow: hidden;
  padding: 0 20px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
}

.step-card {
  width: 320px;
  min-width: 320px;
  text-align: center;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.step-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.step-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.step-card p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-muted);
}

.carousel-arrow {
  background: rgba(0,0,0,0.6);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  width: 55px;
  height: 55px;
  cursor: pointer;
  font-size: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.carousel-arrow:hover {
  transform: scale(1.1);
  background: var(--accent-red);
  box-shadow: 0 0 25px var(--accent-red);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

.play-pause-btn {
  margin-top: 25px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 35px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 2px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.play-pause-btn:hover {
  transform: translateY(-3px);
  background: var(--accent-red);
  box-shadow: 0 0 25px var(--accent-red);
}

.play-pause-btn:active {
  transform: translateY(0);
}

.home-btn {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.home-btn:hover {
  background: var(--accent-red);
  box-shadow: 0 0 25px var(--accent-red);
}

.carousel-arrow:hover {
  transform: scale(1.1);
  background: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

.play-pause-btn {
  margin-top: 25px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 14px 35px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 2px;
}

.play-pause-btn:hover {
  transform: translateY(-3px);
  background: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red);
}

.play-pause-btn:active {
  transform: translateY(0);
}

/* FADE-IN */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* HOME BUTTON */
.nav-buttons {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 100;
}

.home-btn {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
}

.home-btn:hover {
  background: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red);
}

/* ========== DECORATIONS ========== */

/* 1. Glowing Title */
.hero h1 {
  font-size: 64px;
  margin: 0;
  text-shadow: 0 0 20px rgba(255,107,107,0.3), 0 0 40px rgba(255,107,107,0.2);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 20px rgba(255,107,107,0.3), 0 0 40px rgba(255,107,107,0.2); }
  100% { text-shadow: 0 0 30px rgba(255,107,107,0.5), 0 0 60px rgba(255,107,107,0.3); }
}

/* 2. Animated decorative line under section titles */
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
  margin: 10px auto;
  animation: lineGlow 2s ease-in-out infinite;
}

@keyframes lineGlow {
  0%, 100% { width: 60px; opacity: 0.8; }
  50% { width: 100px; opacity: 1; }
}

/* 3. Corner decorations */
.corner-decor {
  position: fixed;
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 1;
}

.corner-decor::before,
.corner-decor::after {
  content: '';
  position: absolute;
  background: var(--accent-red);
  opacity: 0.3;
}

.corner-decor.top-left {
  top: 0;
  left: 0;
}
.corner-decor.top-left::before {
  top: 20px;
  left: 20px;
  width: 50px;
  height: 2px;
}
.corner-decor.top-left::after {
  top: 20px;
  left: 20px;
  width: 2px;
  height: 50px;
}

.corner-decor.top-right {
  top: 0;
  right: 0;
}
.corner-decor.top-right::before {
  top: 20px;
  right: 20px;
  width: 50px;
  height: 2px;
}
.corner-decor.top-right::after {
  top: 20px;
  right: 20px;
  width: 2px;
  height: 50px;
}

.corner-decor.bottom-left {
  bottom: 0;
  left: 0;
}
.corner-decor.bottom-left::before {
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 2px;
}
.corner-decor.bottom-left::after {
  bottom: 20px;
  left: 20px;
  width: 2px;
  height: 50px;
}

.corner-decor.bottom-right {
  bottom: 0;
  right: 0;
}
.corner-decor.bottom-right::before {
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 2px;
}
.corner-decor.bottom-right::after {
  bottom: 20px;
  right: 20px;
  width: 2px;
  height: 50px;
}

/* 4. Floating particles */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-red);
  border-radius: 50%;
  opacity: 0.5;
  animation: floatParticle 15s linear infinite;
}

@keyframes floatParticle {
  0% { transform: translateY(0) translateX(0); opacity: 0.5; }
  25% { transform: translateY(-25vh) translateX(30px); opacity: 0.5; }
  50% { transform: translateY(-50vh) translateX(-20px); opacity: 0.5; }
  75% { transform: translateY(-75vh) translateX(40px); opacity: 0.5; }
  100% { transform: translateY(-150vh) translateX(-30px); opacity: 0; }
}

/* 5. Decorative divider between sections */
.section-divider {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 200px;
  z-index: 100;
}

.section-divider.top {
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
}

.section-divider.bottom {
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
}

.section-divider span {
  width: 40px;
  height: 1px;
  background: var(--accent-red);
  opacity: 0.5;
}

.section-divider .divider-icon {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  transform: rotate(45deg);
  animation: dividerPulse 2s ease-in-out infinite;
}

@keyframes dividerPulse {
  0%, 100% { transform: rotate(45deg) scale(1); opacity: 0.5; }
  50% { transform: rotate(45deg) scale(1.3); opacity: 1; }
}

/* 6. Animated border around cards */
.step-card {
  position: relative;
  width: 320px;
  min-width: 320px;
  text-align: center;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--accent-red), transparent, var(--accent-red));
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.step-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--accent-red), transparent, var(--accent-red));
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  animation: borderGlow 2s linear infinite;
  background-size: 200% 200%;
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.step-card:hover::after {
  opacity: 0.7;
}

.step-card:hover {
  box-shadow: 0 0 30px rgba(255,107,107,0.3), 0 0 60px rgba(255,107,107,0.1);
}