:root {
  --primary: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --background: #0f172a;
  /* Slate 900 */
  --surface: #1e293b;
  /* Slate 800 */
  --text: #f8fafc;
  /* Slate 50 */
  --text-secondary: #94a3b8;
  /* Slate 400 */
  --accent: #ec4899;
  /* Pink 500 */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

/* Scroll Reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.15), transparent 40%);
}

.hero-content h1 {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-content h1 span:first-child {
  display: block;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Keep gradient text */
  min-height: 1.2em;
  /* Reserve space */
}

/* Cursor pointer */
.hero-content h1 span#hero-titles::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--primary);
  margin-left: 5px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-content .highlight {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 900px;
  margin: 0 auto 1.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary);
  color: white;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

/* Hero Buttons Container */
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Ludo Fruit Button */
.btn-ludo {
  position: relative;
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 25%, #48dbfb 50%, #ff9ff3 75%, #ff6b6b 100%);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  overflow: visible;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-ludo:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-ludo .btn-text {
  position: relative;
  z-index: 2;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-fruit {
  position: absolute;
  font-size: 2rem;
  animation: floatFruit 3s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.fruit-1 {
  top: -15px;
  left: -10px;
  animation-delay: 0s;
}

.fruit-2 {
  top: -15px;
  right: -10px;
  animation-delay: 0.75s;
}

.fruit-3 {
  bottom: -15px;
  left: -10px;
  animation-delay: 1.5s;
}

.fruit-4 {
  bottom: -15px;
  right: -10px;
  animation-delay: 2.25s;
}

@keyframes floatFruit {

  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  25% {
    transform: translateY(-10px) rotate(5deg) scale(1.1);
  }

  50% {
    transform: translateY(-5px) rotate(-5deg) scale(1.05);
  }

  75% {
    transform: translateY(-8px) rotate(3deg) scale(1.08);
  }
}

/* Metaverse Button */
.btn-metaverse {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: futuristicGlow 4s ease infinite;
  overflow: hidden;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-metaverse::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes futuristicGlow {

  0%,
  100% {
    background-position: 0% 50%;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 0 30px rgba(102, 126, 234, 0.3);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.5), 0 0 40px rgba(118, 75, 162, 0.4);
  }
}

.btn-metaverse:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.7), 0 0 50px rgba(102, 126, 234, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-metaverse .btn-text {
  position: relative;
  z-index: 2;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-car {
  position: absolute;
  font-size: 2.5rem;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  animation: driveCar 4s linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

@keyframes driveCar {
  0% {
    left: -40px;
    transform: translateY(-50%) scaleX(1);
  }

  45% {
    left: calc(100% + 10px);
    transform: translateY(-50%) scaleX(1);
  }

  50% {
    left: calc(100% + 10px);
    transform: translateY(-50%) scaleX(-1);
  }

  95% {
    left: -40px;
    transform: translateY(-50%) scaleX(-1);
  }

  100% {
    left: -40px;
    transform: translateY(-50%) scaleX(1);
  }
}


/* Projects Section */
.projects-section {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--surface);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -6px rgba(99, 102, 241, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.card-media {
  height: 220px;
  background: #2d3748;
  position: relative;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .card-media img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-content {
  padding: 2rem;
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.view-details {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Detail Page Styles */
.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

.detail-header {
  margin-bottom: 3rem;
  text-align: left;
}

.detail-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.detail-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.detail-category {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.description-section {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4rem;
}

.description-section h2,
.gallery-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.description-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  white-space: pre-wrap;
  /* Preserve line breaks */
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Gallery Scroller */
.gallery-grid {
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  padding: 1rem 0 2rem;
  /* Bottom padding for scrollbar */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

.gallery-grid::-webkit-scrollbar {
  height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.gallery-item {
  flex: 0 0 720px;
  /* Requested size base */
  max-width: 85vw;
  /* Responsive constraint for mobile */
  aspect-ratio: 1 / 1;
  /* Square 720x720 ratio */
  scroll-snap-align: center;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  position: relative;
}

.gallery-item iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer
---------------------------------*/
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 2rem;
  margin-top: 4rem;
  background: #0b1120;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .detail-header h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 350px;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .btn-fruit {
    font-size: 1.5rem;
  }

  .btn-car {
    font-size: 2rem;
  }
}