:root {
  --primary: #1f2937;
  --accent: #6366f1;
  --light-bg: #f9fafb;
  --card-bg: #ffffff;
  --dark-text: #111827;
  --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  padding: 2rem 1rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

header p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: auto;
  padding: 0 1rem;
}

nav {
  background: var(--primary);
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s var(--animation-timing);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

nav a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: all 0.3s var(--animation-timing);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s var(--animation-timing);
  transform: translateX(-50%);
}

nav a:hover::after,
nav a:focus::after {
  width: 100%;
}

nav a:hover,
nav a:focus {
  color: var(--accent);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

section {
  padding: 3rem 1rem;
  max-width: 1100px;
  margin: auto;
  position: relative;
  overflow: hidden;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
  text-align: center;
  position: relative;
  line-height: 1.3;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a5b4fc);
  transform: translateX(-50%);
  border-radius: 2px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.4s var(--animation-timing);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.1);
  touch-action: manipulation;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.6s var(--animation-timing);
}

.card:hover::before,
.card:active::before {
  left: 100%;
}

.card:hover,
.card:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.2);
}

.card h3 {
  color: var(--accent);
  margin-top: 0;
  position: relative;
  font-size: 1.3rem;
  line-height: 1.4;
}

.card p {
  margin-bottom: 0;
  line-height: 1.6;
}

.cli-button-card {
  background: linear-gradient(135deg, var(--accent), #4b46c8);
  color: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s var(--animation-timing);
  cursor: pointer;
  text-decoration: none;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cli-button-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, #7e80ff, #5c58e0);
}

.cli-button-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.cli-button-card h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.cli-button-card p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.cli-button-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s var(--animation-timing);
}

.cli-button-card:hover::before,
.cli-button-card:active::before {
  left: 100%;
}

.highlight,
.cta {
  background: #eef2ff;
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.highlight::before,
.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(99, 102, 241, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--animation-timing);
}

.highlight:hover::before,
.cta:hover::before {
  transform: translateX(100%);
}

.cta {
  text-align: center;
  background: var(--card-bg);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.06);
}

.cta a {
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s var(--animation-timing);
  position: relative;
  overflow: hidden;
  display: inline-block;
  min-height: 48px;
  min-width: 120px;
  touch-action: manipulation;
  font-size: 1rem;
}

.cta a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s var(--animation-timing);
}

.cta a:hover::before,
.cta a:active::before {
  left: 100%;
}

.cta a:hover,
.cta a:active {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

footer a {
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.3s var(--animation-timing);
  padding: 0.5rem;
  display: inline-block;
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

footer a:hover,
footer a:focus {
  color: white;
}

/* --- Enhanced Scroll Animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--animation-timing);
  will-change: opacity, transform;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s var(--animation-timing);
  will-change: opacity, transform;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s var(--animation-timing);
  will-change: opacity, transform;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-bottom {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s var(--animation-timing);
  will-change: opacity, transform;
}

.slide-in-bottom.visible {
  opacity: 1;
  transform: translateY(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.7s var(--animation-timing);
  will-change: opacity, transform;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.rotate-in {
  opacity: 0;
  transform: rotate(-5deg) scale(0.9);
  transition: all 0.8s var(--animation-timing);
  will-change: opacity, transform;
}

.rotate-in.visible {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* --- Parallax Effects --- */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(165, 180, 252, 0.1) 0%, transparent 50%);
  transform: translateZ(0);
  will-change: transform;
}

/* --- Staggered Animations --- */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--animation-timing);
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-item:nth-child(2) {
  transition-delay: 0.2s;
}

.stagger-item:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-item:nth-child(4) {
  transition-delay: 0.4s;
}

/* --- Hero Glassmorphism Section --- */
.hero-glass {
  max-width: 95vw;
  margin: 0 auto 2rem auto;
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1.5rem;
  box-shadow: 0 8px 40px 0 rgba(99, 102, 241, 0.13), 0 1.5px 8px 0 rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  border: 1.5px solid rgba(99, 102, 241, 0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  transition: all 0.4s var(--animation-timing);
}

.hero-glass:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 50px 0 rgba(99, 102, 241, 0.18), 0 2px 12px 0 rgba(31, 41, 55, 0.12);
}

.hero-logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
  transition: all 0.4s var(--animation-timing);
  flex-wrap: wrap;
}

.hero-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.13);
  object-fit: contain;
  transition: all 0.4s var(--animation-timing);
}

.hero-logo:hover {
  transform: rotate(3deg) scale(1.03);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: -1px;
  color: #1a1a1a;
  text-shadow: 0 2px 8px rgba(99, 102, 241, 0.04);
  transition: all 0.4s var(--animation-timing);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3a4a;
  margin: 0.7rem 0 1rem 0;
  line-height: 1.4;
  transition: all 0.4s var(--animation-timing);
  padding: 0 0.5rem;
}

.hero-note {
  font-size: 1rem;
  color: #3a3a3a;
  margin-bottom: 0.5rem;
  font-weight: 500;
  transition: all 0.4s var(--animation-timing);
  padding: 0 0.5rem;
  line-height: 1.5;
}

.hero-cta-btn {
  display: none;
}

.hero-bg-blur {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 60% 40%, #6366f1 0%, #a5b4fc 40%, transparent 80%),
    linear-gradient(120deg, #6366f1 0%, #f9fafb 100%);
  opacity: 0.55;
  filter: blur(32px) saturate(1.2);
}

.hero-glass,
.hero-logo-title,
.hero-title,
.hero-subtitle,
.hero-note {
  position: relative;
  z-index: 1;
}

/* --- Smooth Scrolling --- */
html {
  scroll-behavior: smooth;
}

/* --- Loading Animation --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading {
  animation: fadeInUp 0.6s var(--animation-timing) forwards;
}

/* --- Floating Animation --- */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* --- Pulse Animation --- */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Mobile Navigation --- */
.hamburger {
  display: none;
  /* Hidden on desktop; shown on mobile below */
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Desktop default: show nav links inline */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Mobile Responsive Design --- */
@media (max-width: 768px) {

  /* Header adjustments */
  header {
    padding: 1.5rem 0.5rem 1rem;
    min-height: 80vh;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  /* Navigation mobile */
  nav {
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: none;
    /* Keep bar present; dropdown is positioned fixed */
    overflow: visible;
    transition: none;
  }

  /* Mobile: show hamburger button fixed at top-right */
  .hamburger {
    display: flex;
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1002;
    background: rgba(31, 41, 55, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  /* Mobile: hide inline links, use dropdown */
  .nav-links {
    display: none;
  }

  nav.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: fixed;
    top: 3.25rem;
    /* Below the hamburger */
    right: 0.75rem;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
    z-index: 1001;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  nav.open .nav-links a {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  nav.open .nav-links a:last-child {
    border-bottom: none;
  }

  nav a {
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    font-size: 1rem;
  }

  /* Handled above */

  /* Hero section mobile */
  .hero-glass {
    padding: 2rem 1rem 1.5rem 1rem;
    border-radius: 1rem;
    margin: 0 0.5rem 1.5rem 0.5rem;
  }

  .hero-logo-title {
    gap: 0.8rem;
  }

  .hero-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

  .hero-title {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    padding: 0 0.3rem;
  }

  .hero-note {
    font-size: 0.95rem;
    padding: 0 0.3rem;
  }

  /* Section adjustments */
  section {
    padding: 2rem 0.5rem;
  }

  h2 {
    font-size: 1.8rem;
    padding: 0 0.5rem;
  }

  /* Cards mobile */
  .cards {
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .card {
    padding: 1.2rem;
    min-height: 180px;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  /* CLI Button Cards mobile */
  .cli-button-card {
    padding: 1.5rem;
  }

  .cli-button-card h3 {
    font-size: 1.3rem;
  }

  .cli-button-card p {
    font-size: 0.9rem;
  }

  /* CTA mobile */
  .cta {
    margin: 1.5rem 0.5rem;
    padding: 1.2rem;
  }

  .cta a {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    min-width: 100px;
  }

  /* Highlight mobile */
  .highlight {
    margin: 1.5rem 0.5rem;
    padding: 1.2rem;
  }

  /* Footer mobile */
  footer {
    padding: 1.5rem 0.5rem;
  }

  /* Disable some animations on mobile for performance */
  .float {
    animation: none;
  }

  .pulse {
    animation: none;
  }

  /* Reduce parallax intensity on mobile */
  .parallax-bg {
    transform: none;
  }
}

@media (max-width: 480px) {

  /* Extra small devices */
  header h1 {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-note {
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .card {
    padding: 1rem;
    min-height: 160px;
  }

  .card h3 {
    font-size: 1.1rem;
  }

  .cli-button-card {
    padding: 1.2rem;
  }

  .cli-button-card h3 {
    font-size: 1.2rem;
  }

  .cli-button-card p {
    font-size: 0.85rem;
  }

  .cta a {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* --- Touch Device Optimizations --- */
@media (hover: none) and (pointer: coarse) {

  /* Disable hover effects on touch devices */
  .card:hover,
  .cli-button-card:hover,
  .cta a:hover,
  .hero-glass:hover,
  .hero-logo:hover {
    transform: none;
    box-shadow: inherit;
  }

  /* Add active states for touch */
  .card:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
  }

  .cli-button-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
  }

  .cta a:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  }

  /* Increase touch targets */
  nav a,
  .cta a,
  footer a {
    min-height: 48px;
    min-width: 48px;
  }

  /* Reduce animation complexity for better performance */
  .stagger-item:nth-child(1) {
    transition-delay: 0.05s;
  }

  .stagger-item:nth-child(2) {
    transition-delay: 0.1s;
  }

  .stagger-item:nth-child(3) {
    transition-delay: 0.15s;
  }

  .stagger-item:nth-child(4) {
    transition-delay: 0.2s;
  }
}

/* --- Landscape Mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    min-height: 60vh;
    padding: 1rem 0.5rem;
  }

  .hero-glass {
    padding: 1.5rem 1rem;
  }

  .hero-logo-title {
    gap: 0.6rem;
  }

  .hero-logo {
    width: 45px;
    height: 45px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0 0.8rem 0;
  }

  .hero-note {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }
}

/* --- High DPI Displays --- */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .hero-logo,
  .card,
  .cli-button-card,
  .cta a {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    margin: 1.5rem 0.5rem;
    padding: 1.2rem;
  }

  .cta a {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    min-width: 100px;
  }

  /* Highlight mobile */
  .highlight {
    margin: 1.5rem 0.5rem;
    padding: 1.2rem;
  }

  /* Footer mobile */
  footer {
    padding: 1.5rem 0.5rem;
  }

  /* Disable some animations on mobile for performance */
  .float {
    animation: none;
  }

  .pulse {
    animation: none;
  }

  /* Reduce parallax intensity on mobile */
  .parallax-bg {
    transform: none;
  }
}

@media (max-width: 480px) {

  /* Extra small devices */
  header h1 {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-note {
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .card {
    padding: 1rem;
    min-height: 160px;
  }

  .card h3 {
    font-size: 1.1rem;
  }

  .cli-button-card {
    padding: 1.2rem;
  }

  .cli-button-card h3 {
    font-size: 1.2rem;
  }

  .cli-button-card p {
    font-size: 0.85rem;
  }

  .cta a {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* --- Touch Device Optimizations --- */
@media (hover: none) and (pointer: coarse) {

  /* Disable hover effects on touch devices */
  .card:hover,
  .cli-button-card:hover,
  .cta a:hover,
  .hero-glass:hover,
  .hero-logo:hover {
    transform: none;
    box-shadow: inherit;
  }

  /* Add active states for touch */
  .card:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
  }

  .cli-button-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
  }

  .cta a:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  }

  /* Increase touch targets */
  nav a,
  .cta a,
  footer a {
    min-height: 48px;
    min-width: 48px;
  }

  /* Reduce animation complexity for better performance */
  .stagger-item:nth-child(1) {
    transition-delay: 0.05s;
  }

  .stagger-item:nth-child(2) {
    transition-delay: 0.1s;
  }

  .stagger-item:nth-child(3) {
    transition-delay: 0.15s;
  }

  .stagger-item:nth-child(4) {
    transition-delay: 0.2s;
  }
}

/* --- Landscape Mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    min-height: 60vh;
    padding: 1rem 0.5rem;
  }

  .hero-glass {
    padding: 1.5rem 1rem;
  }

  .hero-logo-title {
    gap: 0.6rem;
  }

  .hero-logo {
    width: 45px;
    height: 45px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0 0.8rem 0;
  }

  .hero-note {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }
}

/* --- High DPI Displays --- */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .hero-logo,
  .card,
  .cli-button-card,
  .cta a {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .float,
  .pulse {
    animation: none;
  }
}

/* --- Mermaid Modal --- */
.mermaid {
  cursor: pointer;
  transition: transform 0.3s ease;
  width: 100%;
  max-width: none;
  margin: 2rem 0;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.mermaid:hover {
  transform: scale(1.01);
}

.mermaid-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mermaid-modal.show {
  opacity: 1;
}

.mermaid-modal-content {
  margin: auto;
  display: block;
  max-width: 95%;
  max-height: 95%;
  overflow: auto;
  background: #1e293b;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.2);
}

.mermaid-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10001;
}

.mermaid-modal-close:hover,
.mermaid-modal-close:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* --- File Tree --- */
.file-tree {
  font-family: 'Consolas', 'Monaco', monospace;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tree-item {
  margin-left: 1.5rem;
  position: relative;
}

.tree-folder {
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  user-select: none;
}

.tree-folder:hover {
  background: rgba(251, 191, 36, 0.1);
  transform: translateX(2px);
}

.tree-folder::before {
  content: '📁';
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.tree-folder.open::before {
  content: '📂';
  transform: rotate(0deg);
}

.tree-file {
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tree-file:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #e2e8f0;
  transform: translateX(2px);
}

.tree-file::before {
  content: '📄';
  font-size: 1em;
  opacity: 0.8;
}

.tree-desc {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.85em;
  margin-left: 0.5rem;
}

.tree-children {
  margin-left: 0.5rem;
  border-left: 2px solid rgba(99, 102, 241, 0.2);
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-children.visible {
  max-height: 5000px;
  opacity: 1;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}




/* --- Architecture Map --- */
.architecture-map {
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.4);
}

.arch-node {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.arch-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
}

.main-hub {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  border: 3px solid #c084fc;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
}

.main-hub:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.node-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.node-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.node-desc {
  font-size: 1.1rem;
  color: #e0e7ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.arch-group {
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.arch-group:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.6);
}

.group-title {
  color: #c4b5fd;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(167, 139, 250, 0.5);
  letter-spacing: 0.5px;
}

.node-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.node-list.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.sub-node {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(168, 85, 247, 0.3) 100%);
  border: 2px solid rgba(168, 85, 247, 0.6);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #f3f4f6;
  font-weight: 600;
}

.sub-node:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  border-color: #c084fc;
  color: #ffffff;
  transform: translateX(6px) scale(1.02);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.db-node {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(16, 185, 129, 0.4) 100%);
  border: 2px solid rgba(34, 197, 94, 0.8);
  color: #d1fae5;
}

.db-node:hover {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  border-color: #4ade80;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

.ui-group {
  border-left: 5px solid #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.6);
}

.collectors-group {
  border-left: 5px solid #ec4899;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
  border-color: rgba(236, 72, 153, 0.6);
}

.data-group {
  border-left: 5px solid #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-color: rgba(34, 197, 94, 0.6);
}

.timeline-group {
  border-left: 5px solid #fb923c;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
  border-color: rgba(251, 146, 60, 0.6);
}

@media (max-width: 768px) {
  .arch-grid {
    grid-template-columns: 1fr;
  }

  .node-list.two-col {
    grid-template-columns: 1fr;
  }
}


/* Forensic Alert Box - Cyberpunk Orange Theme */
.forensic-alert {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.15) 0%, rgba(255, 69, 0, 0.15) 100%);
  border: 2px solid rgba(255, 140, 0, 0.4);
  border-left: 4px solid #ff8c00;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.forensic-alert h4 {
  color: #ffaa33;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.forensic-alert p {
  color: #e2e8f0;
  margin: 0.5rem 0;
}

/* MBR Mini Visualization */
.mbr-mini-vis {
  display: flex;
  width: 100%;
  height: 60px;
  border-radius: 8px;
  /* overflow: hidden; Removed to allow tooltips */
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: monospace;
  font-size: 0.8rem;
}

.mbr-mini-part {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  transition: all 0.3s ease;
  min-width: 40px;
  /* Ensure visibility */
}

.mbr-mini-part:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.mbr-mini-part:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.mbr-mini-part:hover {
  filter: brightness(1.2);
}

.mbr-mini-part span {
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Tooltip behavior */
.mbr-mini-part::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mbr-mini-part:hover::after {
  opacity: 1;
}

.mbr-boot {
  width: 87.1%;
  /* 446/512 */
  background: #22c55e;
}

.mbr-table {
  width: 12.5%;
  /* 64/512 */
  background: #eab308;
}

.mbr-sig {
  width: 0.4%;
  /* 2/512 */
  background: #ef4444;
}

/* MBR vs GPT Comparison */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.comparison-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.comparison-card:hover {
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10001;
}

.mermaid-modal-close:hover,
.mermaid-modal-close:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* --- File Tree --- */
.file-tree {
  font-family: 'Consolas', 'Monaco', monospace;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tree-item {
  margin-left: 1.5rem;
  position: relative;
}

.tree-folder {
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  user-select: none;
}

.tree-folder:hover {
  background: rgba(251, 191, 36, 0.1);
  transform: translateX(2px);
}

.tree-folder::before {
  content: '📁';
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.tree-folder.open::before {
  content: '📂';
  transform: rotate(0deg);
}

.tree-file {
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tree-file:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #e2e8f0;
  transform: translateX(2px);
}

.tree-file::before {
  content: '📄';
  font-size: 1em;
  opacity: 0.8;
}

.tree-desc {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.85em;
  margin-left: 0.5rem;
}

.tree-children {
  margin-left: 0.5rem;
  border-left: 2px solid rgba(99, 102, 241, 0.2);
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-children.visible {
  max-height: 5000px;
  opacity: 1;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}


/* Forensic Alert Box - Cyberpunk Orange Theme */
.forensic-alert {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid rgba(255, 140, 0, 0.4);
  border-left: 4px solid #ff8c00;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  color: white;
}

.forensic-alert h4 {
  color: #ffaa33;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.forensic-alert p {
  color: #e2e8f0;
  margin: 0.5rem 0;
}

/* MBR Mini Visualization */
.mbr-mini-vis {
  display: flex;
  width: 100%;
  height: 60px;
  border-radius: 8px;
  /* overflow: hidden; Removed to allow tooltips */
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: monospace;
  font-size: 0.8rem;
}

.mbr-mini-part {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  transition: all 0.3s ease;
  min-width: 40px;
  /* Ensure visibility */
}

.mbr-mini-part:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.mbr-mini-part:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.mbr-mini-part:hover {
  filter: brightness(1.2);
}

.mbr-mini-part span {
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Tooltip behavior */
.mbr-mini-part::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mbr-mini-part:hover::after {
  opacity: 1;
}

/* Boot Flow Diagram Styles */
.boot-diagram {
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: white;
}

.diagram-title {
  text-align: center;
  color: #ffffff !important;
  font-weight: 700;
  margin-bottom: 2rem;
}

.boot-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-left: 3rem;
}

.boot-flow::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6);
  opacity: 0.5;
}

.boot-step {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  color: white;
}

.boot-step:hover {
  transform: translateX(10px);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.boot-step::before {
  content: attr(data-step);
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
}

.boot-step::after {
  content: '→';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #6366f1;
  z-index: 1;
}

.boot-step h4 {
  margin: 0 0 0.5rem 0;
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.boot-diagram .boot-step h4 {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.boot-step p {
  margin: 0;
  color: #e2e8f0 !important;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive styles for boot-diagram */
@media (max-width: 768px) {
  .boot-flow {
    padding-left: 2rem;
  }

  .boot-flow::before {
    left: 16px;
  }

  .boot-step {
    padding: 1rem;
  }

  .boot-step::before {
    left: -32px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .boot-step::after {
    left: -10px;
    font-size: 1.2rem;
  }

  .boot-step:hover {
    transform: translateX(5px);
  }

  .boot-step h4 {
    font-size: 1rem;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  }

  .boot-step p {
    font-size: 0.9rem;
    color: #e2e8f0 !important;
  }
}


.mbr-table {
  width: 12.5%;
  /* 64/512 */
  background: #eab308;
}

.mbr-sig {
  width: 0.4%;
  /* 2/512 */
  background: #ef4444;
}

/* GPT Structure Diagram */
.gpt-structure {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 2rem 0;
}

.gpt-block {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  padding: 1rem;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  color: white;
}

.gpt-block:hover {
  transform: scale(1.02);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.gpt-block.protective {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

.gpt-block.header {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(34, 197, 94, 0.4);
}

.gpt-block.partition-table {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(234, 179, 8, 0.4);
}

.gpt-block.data {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  min-height: 100px;
}

.block-label {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

/* MBR Structure Diagram */
.mbr-structure {
  display: grid;
  grid-template-columns: 446fr 64fr 2fr;
  gap: 0.5rem;
  margin: 2rem 0;
  position: relative;
  z-index: 1;
}

.mbr-block {
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  padding: 1rem;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.mbr-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.mbr-block.boot-code {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(34, 197, 94, 0.4);
}

.mbr-block.partition-table {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(234, 179, 8, 0.4);
}

.mbr-block.signature {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

/* User Guide Setup Options */
.setup-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.setup-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  color: white;
}

.setup-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.admin-notice {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.5);
  color: #fbbf24;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sub-text {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.code-block {
  background: rgba(15, 23, 42, 0.6);
  padding: 0.75rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-family: monospace;
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #e2e8f0;
}

/* Common Issues Styling */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.issue-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  color: white;
}

.issue-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.issue-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.issue-icon {
  font-size: 1.5rem;
}

.issue-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #f87171;
}

.issue-solution {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
}
/* --- Thank You Card --- */
.thank-you-card {
  margin-top: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border: 1px solid rgba(165, 180, 252, 0.3);
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(49, 46, 129, 0.4);
  border-radius: 16px;
}

.thank-you-card p {
  font-size: 1.3rem;
  color: #e0e7ff;
  font-weight: 700;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.thank-you-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 50px rgba(49, 46, 129, 0.5);
  border-color: rgba(165, 180, 252, 0.5);
}

/* --- Company Card --- */
.company-card {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 20px rgba(76, 29, 149, 0.3);
}

.company-card h3 {
  color: #a78bfa !important;
}

/* --- Donor Card --- */
.donor-card {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border: 1px solid rgba(251, 146, 60, 0.3);
  box-shadow: 0 4px 20px rgba(120, 53, 15, 0.3);
}

.donor-card h3 {
  color: #fbbf24 !important;
}



/* --- Flow Diagram Styles --- */
.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.4);
  margin: 2rem 0;
}

.flow-node {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  padding: 1rem 2rem;
  min-width: 200px;
  text-align: center;
  color: #f1f5f9;
  font-weight: 600;
  transition: all 0.3s ease;
}

.flow-node:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
}

.start-node {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  border-color: #4ade80;
}

.decision-node {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
  border-radius: 50%;
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.process-node {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-color: #a78bfa;
}

.flow-arrow {
  font-size: 2rem;
  color: #6366f1;
  font-weight: bold;
}

.decision-branches {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .flow-node {
    min-width: 150px;
    padding: 0.75rem 1rem;
  }
  
  .decision-node {
    width: 120px;
    height: 120px;
  }
}


/* --- Dependency Graph Styles --- */
.dependency-graph {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.4);
  margin: 2rem 0;
}

.dep-layer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.dep-node {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 12px;
  padding: 1rem 2rem;
  color: #f1f5f9;
  font-weight: 600;
  font-family: 'Consolas', 'Monaco', monospace;
  transition: all 0.3s ease;
}

.dep-node:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.8);
}

.base-layer {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
}

.dep-connections {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 30px;
  position: relative;
}

.dep-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .dep-layer {
    flex-direction: column;
    align-items: center;
  }
  
  .dep-node {
    width: 100%;
    max-width: 250px;
  }
}


/* --- Component Interaction Diagram Styles (Unique - Green Border) --- */
.component-interaction-diagram {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(34, 197, 94, 0.4); /* Green border - unique to this diagram */
}

.interaction-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.center-node {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  border: 3px solid #4ade80;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
  transition: all 0.3s ease;
}

.center-node:hover {
  transform: scale(1.1);
  box-shadow: 0 0 50px rgba(34, 197, 94, 0.7);
}

.center-node .node-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.center-node .node-label {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

.interaction-ring {
  position: relative;
  width: 100%;
  height: 100%;
}

.interaction-node {
  position: absolute;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 5;
}

.interaction-node:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.8);
  z-index: 15;
}

.interaction-node[data-position="top"] {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.interaction-node[data-position="right"] {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.interaction-node[data-position="bottom"] {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.interaction-node[data-position="left"] {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.interaction-node .node-label {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem;
}

.connection-line {
  position: absolute;
  background: linear-gradient(to bottom, rgba(34, 197, 94, 0.6), rgba(34, 197, 94, 0.2));
  z-index: 1;
}

.line-top {
  width: 2px;
  height: 150px;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.line-right {
  width: 150px;
  height: 2px;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(to right, rgba(34, 197, 94, 0.6), rgba(34, 197, 94, 0.2));
}

.line-bottom {
  width: 2px;
  height: 150px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.line-left {
  width: 150px;
  height: 2px;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(to left, rgba(34, 197, 94, 0.6), rgba(34, 197, 94, 0.2));
}

@media (max-width: 768px) {
  .component-interaction-diagram {
    height: 500px;
    max-width: 100%;
  }
  
  .center-node {
    width: 100px;
    height: 100px;
  }
  
  .center-node .node-icon {
    font-size: 2rem;
  }
  
  .interaction-node {
    width: 80px;
    height: 80px;
  }
  
  .line-top, .line-bottom {
    height: 100px;
  }
  
  .line-left, .line-right {
    width: 100px;
  }
}


/* --- Dual-Engine Architecture Comparison Styles (Unique - Pink Border) --- */
.dual-engine-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(236, 72, 153, 0.4); /* Pink border - unique to this diagram */
}

.engine-column {
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.engine-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
}

.time-based-engine {
  border-color: rgba(59, 130, 246, 0.5);
}

.time-based-engine:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.identity-based-engine {
  border-color: rgba(168, 85, 247, 0.5);
}

.identity-based-engine:hover {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.engine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.engine-header h3 {
  color: #ffffff !important;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.engine-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Consolas', 'Monaco', monospace;
}

.engine-visual {
  text-align: center;
  margin: 1.5rem 0;
}

.engine-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.engine-flow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.engine-flow .flow-step {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
}

.engine-flow .flow-step:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  transform: scale(1.02);
}

.engine-flow .flow-arrow {
  color: #6366f1;
  font-size: 1.5rem;
  font-weight: bold;
}

.engine-features {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(99, 102, 241, 0.2);
}

.engine-features h4 {
  color: #a78bfa;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.engine-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.engine-features li {
  color: #cbd5e1;
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
}

.engine-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: bold;
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-divider span {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
  border: 3px solid #f472b6;
}

@media (max-width: 768px) {
  .dual-engine-comparison {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  
  .vs-divider {
    order: 2;
    padding: 1rem 0;
  }
  
  .time-based-engine {
    order: 1;
  }
  
  .identity-based-engine {
    order: 3;
  }
}


/* --- Enhanced Component Box Styles with Icons --- */
.component-interaction-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  padding: 0;
  background: none;
  border: none;
  height: auto;
  max-width: 100%;
}

.component-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.component-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--component-color, #6366f1) 0%, transparent 100%);
}

.component-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.feather-component {
  --component-color: #06b6d4; /* Cyan */
  border: 2px solid rgba(6, 182, 212, 0.3);
}

.feather-component:hover {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.2);
}

.wings-component {
  --component-color: #10b981; /* Green */
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.wings-component:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.2);
}

.engine-component {
  --component-color: #f59e0b; /* Amber */
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.engine-component:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2);
}

.config-component {
  --component-color: #8b5cf6; /* Purple */
  border: 2px solid rgba(139, 92, 246, 0.3);
}

.config-component:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.2);
}

.pipeline-component {
  --component-color: #ec4899; /* Pink */
  border: 2px solid rgba(236, 72, 153, 0.3);
}

.pipeline-component:hover {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.2);
}

.component-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.component-box h4 {
  color: #f1f5f9;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.component-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: center;
  margin: 0 0 1.5rem 0;
  font-style: italic;
}

.component-details {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.component-details p {
  margin: 0.75rem 0;
}

.component-details strong {
  color: #f1f5f9;
  font-weight: 600;
}

.component-details ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.component-details li {
  margin: 0.25rem 0;
  color: #cbd5e1;
}

.component-details code {
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #a5b4fc;
  font-family: 'Consolas', 'Monaco', monospace;
}

@media (max-width: 768px) {
  .component-interaction-diagram {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .component-box {
    padding: 1.5rem;
  }
  
  .component-icon {
    font-size: 2.5rem;
  }
}


/* Performance Optimizations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* GPU acceleration for smooth scrolling */
.doc-container,
.doc-sidebar,
.doc-content {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
