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

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Catppuccin Macchiato (Dark) – DEFAULT THEME */
:root {
  --rosewater: rgb(244, 219, 214);
  --flamingo: rgb(240, 198, 198);
  --pink: rgb(245, 189, 230);
  --mauve: rgb(198, 160, 246);
  --red: rgb(237, 135, 150);
  --maroon: rgb(238, 153, 160);
  --peach: rgb(245, 169, 127);
  --yellow: rgb(238, 212, 159);
  --green: rgb(166, 218, 149);
  --teal: rgb(139, 213, 202);
  --sky: rgb(145, 215, 227);
  --sapphire: rgb(125, 196, 228);
  --blue: rgb(138, 173, 244);
  --lavender: rgb(183, 189, 248);
  --text: rgb(202, 211, 245);
  --subtext1: rgb(184, 192, 224);
  --subtext0: rgb(165, 173, 203);
  --overlay2: rgb(147, 154, 183);
  --overlay1: rgb(128, 135, 162);
  --overlay0: rgb(110, 115, 141);
  --surface2: rgb(91, 96, 120);
  --surface1: rgb(73, 77, 100);
  --surface0: rgb(54, 58, 79);
  --base: rgb(36, 39, 58);
  --mantle: rgb(30, 32, 48);
  --crust: rgb(24, 25, 38);

  /* UI variables */
  --background: var(--base);
  --foreground: var(--text);
  --primary: var(--blue);
  --secondary: var(--surface1);
  --accent: var(--lavender);
  --muted: var(--surface1);
  --border: var(--surface2);
}

/* Body */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  padding-top: 70px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--lavender));
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--primary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--lavender));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass effect */
.glass-effect {
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  border-radius: 1rem;
}

/* Grid pattern */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease-out;
}
.animate-on-scroll-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.animate-on-scroll-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease-out;
}
.animate-on-scroll-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Section spacing */
section {
  padding: 6rem 0;
}

/* System Architecture Card */
.system-architecture-card {
  background: rgba(54, 58, 79, 0.6);
}


/* Masonry Testimonials */
.masonry-testimonials {
  column-count: 2;
  column-gap: 2rem;
}
@media (min-width: 900px) {
  .masonry-testimonials {
    column-count: 3;
  }
}
@media (max-width: 700px) {
  .masonry-testimonials {
    column-count: 1;
  }
}
.masonry-testimonials .glass-effect {
  display: inline-block;
  width: 100%;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  section {
    padding: 4rem 0;
  }
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  /* Hero Section */
  .hero-section {
    min-height: unset !important;
    padding: 5rem 0 !important;
    flex-direction: column !important;
  }
  .hero-section .container {
    padding: 0 0.5rem !important;
  }
  .hero-section h1 {
    font-size: 2rem !important;
  }
  .hero-section p {
    font-size: 1rem !important;
  }
  .hero-section .btn,
  .hero-section .btn-outline {
    width: 100%;
    justify-content: center;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
  }
  .hero-section .glass-effect {
    font-size: 0.95rem !important;
    padding: 0.4rem 0.8rem !important;
  }
  .hero-section [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  /* Responsive Nav */
  nav .container > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 0.5rem 0 !important;
  }
  nav .container > div > div:first-child {
    justify-content: center !important;
    margin-bottom: 0.5rem !important;
  }
  nav .container > div > div:last-child {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  nav a,
  nav button {
    font-size: 1rem !important;
    padding: 0.5rem 0.75rem !important;
  }
  nav .btn,
  nav .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.3rem !important;
  }
}
/* Glassmorphism styles */
 .glass {
     background: rgba(255, 255, 255, 0.05);
     backdrop-filter: blur(20px);
     border: 1px solid rgba(255, 255, 255, 0.1);
     border-radius: 20px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
 .glass-strong {
     background: rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(25px);
     border: 1px solid rgba(255, 255, 255, 0.2);
     border-radius: 25px;
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
/* Enhanced Header */
 header {
     position: fixed;
     top: 20px;
     left: 50%;
     transform: translateX(-50%);
     z-index: 100;
     width: 96%;
     max-width: 1200px;
     padding: 18px 35px;
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
     background: rgba(224, 163, 255, 0.08);
     backdrop-filter: blur(25px);
     border: 1px solid rgba(224, 163, 255, 0.15);
     border-radius: 25px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
 header.scrolled {
     background: rgba(163, 172, 255, 0.12);
     backdrop-filter: blur(30px);
     border-color: rgba(163, 177, 255, 0.2);
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
 nav {
     display: flex;
     justify-content: space-between;
     align-items: center;
}
 .logo:hover {
     transform: scale(1.05);
}
 .logo-icon {
     width: 40px;
     height: 40px;
     filter: drop-shadow(0 0 10px #a3b8ff);
}
 @keyframes logoGlow {
     0%, 100% {
         filter: drop-shadow(0 0 10px #a3b4ff);
    }
     50% {
         filter: drop-shadow(0 0 20px #6973ff);
    }
}
 .nav-links {
     display: flex;
     list-style: none;
     gap: 12px;
}
 .nav-links a {
     color: #ffffff;
     text-decoration: none;
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
     position: relative;
     padding: 12px 20px;
     border-radius: 15px;
     font-size: 0.95rem;
     font-weight: 500;
     letter-spacing: 0.02em;
}
 .nav-links a.active {
     color: #ffffff;
     background: linear-gradient(135deg, rgba(224, 163, 255, 0.15), rgba(255, 105, 180, 0.1));
     box-shadow: 0 0 20px rgba(224, 163, 255, 0.4);
     border: 1px solid rgba(224, 163, 255, 0.3);
     text-shadow: 0 0 10px rgba(224, 163, 255, 0.8);
     transform: translateY(-1px);
}
 .nav-links a.active::after {
     content: '';
     position: absolute;
     top: -2px;
     left: -2px;
     right: -2px;
     bottom: -2px;
     background: linear-gradient(45deg, #a4a3ff, #7869ff, #4f6ccc, #000000);
     background-size: 400% 400%;
     border-radius: 17px;
     z-index: -2;
     animation: borderGlow 3s ease infinite;
}
.nav-links a.external-link::after {
    content: " ↗";
    font-size: 0.8em;
    vertical-align: super;
}
 @keyframes borderGlow {
     0% {
         background-position: 0% 50%;
    }
     50% {
         background-position: 100% 50%;
    }
     100% {
         background-position: 0% 50%;
    }
}
/* Mobile Menu */
 .mobile-menu-toggle {
     display: none;
     flex-direction: column;
     cursor: pointer;
     padding: 8px;
     border-radius: 8px;
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid rgba(255, 255, 255, 0.1);
     transition: all 0.3s ease;
}
 .mobile-menu-toggle:hover {
     background: rgba(224, 163, 255, 0.1);
     box-shadow: 0 0 15px rgba(224, 163, 255, 0.3);
}
/* Mobile menu active state */
.mobile-nav a.active {
    background: linear-gradient(135deg, rgba(224, 163, 255, 0.22), rgba(114, 135, 253, 0.18));
    color: var(--foreground);
    border: 1px solid rgba(224, 163, 255, 0.4);
    box-shadow: 0 0 22px rgba(163, 177, 255, 0.35);
    transform: translateY(-2px);
}
 .hamburger-line {
     width: 25px;
     height: 3px;
     background: linear-gradient(45deg, #a3c0ff, #3357bb);
     margin: 3px 0;
     border-radius: 2px;
     transition: all 0.3s ease;
}
 .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
     transform: rotate(45deg) translate(9px, 9px);
}
 .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
     opacity: 0;
}
 .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
     transform: rotate(-45deg) translate(7px, -6px);
}
 .mobile-nav {
     position: fixed;
     top: 90px;
     left: 50%;
     transform: translateX(-50%);
     width: 90%;
     max-width: 400px;
     background: rgba(24, 25, 38, 0.85);
     backdrop-filter: blur(22px) saturate(120%);
     -webkit-backdrop-filter: blur(22px) saturate(120%);
     border: 1px solid rgba(224, 163, 255, 0.15);
     border-radius: 20px;
     padding: 10px;
     display: none;
     flex-direction: column;
     gap: 20px;
     box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
     z-index: 200;
  }
 .mobile-nav.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

/* Full-screen overlay behind mobile nav */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 24, 0.6);
  backdrop-filter: blur(6px) saturate(110%);
  -webkit-backdrop-filter: blur(6px) saturate(110%);
  z-index: 150;
}

.mobile-nav-overlay[hidden] {
  display: none !important;
}

/* Fallbacks when backdrop-filter is unavailable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mobile-nav {
    background: rgba(24, 25, 38, 0.95);
  }
  .mobile-nav-overlay {
    background: rgba(15, 16, 24, 0.7);
  }
}

/* Modern Full-Screen Mobile Sheet Navigation */
.mobile-overlay {
  position: fixed;
  inset: 0;
  /* Keep for click-to-close, but no visual dimming */
  background: transparent;
  z-index: 998;
}
.mobile-overlay[hidden] { display: none !important; }

.mobile-sheet {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translate(-50%, -8px) scaleY(0.98);
  display: flex;
  flex-direction: column;
  width: 92%;
  max-width: 520px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  /* Solid, opaque theme background (no transparency) */
  background: linear-gradient(180deg, var(--mantle) 0%, var(--crust) 100%);
  color: #f5f7fb;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}
.mobile-sheet.open {
  transform: translate(-50%, 0) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface2);
}
.mobile-sheet-title {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mobile-sheet-close {
  appearance: none;
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.mobile-sheet-close:hover { background: rgba(255,255,255,0.06); transform: rotate(0.5deg); }
.mobile-sheet-close:active { transform: scale(0.98); }

.mobile-sheet-links {
  display: grid;
  grid-auto-rows: min-content;
  gap: 0.75rem;
  padding: 1rem;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: #e5e9f0;
  border-radius: 14px;
  /* Solid buttons (no transparency) */
  background: var(--surface0);
  border: 1px solid var(--surface2);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.mobile-link:hover {
  background: var(--surface1);
  border-color: var(--surface2);
  transform: translateY(-1px);
}
.mobile-link:active { transform: translateY(0); }
.mobile-link.external .mobile-link-suffix { margin-left: auto; opacity: 0.9; }
.mobile-link-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--subtext0); }

@media (min-width: 480px) {
  .mobile-sheet {
    width: 90%;
    max-width: 560px;
  }
}
 @keyframes slideDown {
     from {
         opacity: 0;
         transform: translateX(-50%) translateY(-20px);
    }
     to {
         opacity: 1;
         transform: translateX(-50%) translateY(0);
    }
}
 .mobile-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(224, 163, 255, 0.12);
    border: 1px solid rgba(224, 163, 255, 0.22);
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
  }
  .mobile-nav a:hover {
    background: linear-gradient(135deg, rgba(163, 177, 255, 0.18), rgba(114, 135, 253, 0.14));
    color: var(--lavender);
    box-shadow: 0 0 20px rgba(163, 177, 255, 0.28);
    transform: translateY(-2px);
  }
/* Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  position: relative;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.2s ease;
  white-space: nowrap;
  margin-right: auto;
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  object-fit: cover;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--lavender));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--lavender);
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
  margin-left: 1rem;
}

.menu-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(24, 25, 38, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  text-align: center;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--lavender);
}

.mobile-cta {
  margin: 0.5rem 1.5rem;
  width: calc(100% - 3rem);
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: flex;
    margin-left: auto;
  }
  
  .nav-links {
    display: none;
  }
  
  .navbar {
    padding: 0.5rem 1rem;
    position: fixed;
    width: 100%;
    box-sizing: border-box;
  }
  
  body {
    padding-top: 60px;
  }
}
@media (max-width: 1000px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}