/* AI Hands-On — custom layer beyond Tailwind */
:root {
  --lab-glow: rgba(45, 212, 191, 0.15);
  --lab-violet-glow: rgba(167, 139, 250, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0c0f14;
  color: #e2e8f0;
}

/* Diagonal mesh background */
.lab-bg {
  background-color: #0c0f14;
  background-image:
    linear-gradient(135deg, transparent 0%, transparent 48%, rgba(45, 212, 191, 0.03) 49%, rgba(45, 212, 191, 0.03) 51%, transparent 52%),
    linear-gradient(315deg, #0c0f14 0%, #151a22 50%, #0c0f14 100%);
  background-size: 24px 24px, 100% 100%;
}

/* Noise overlay (CSS-only subtle grain) */
.lab-noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

/* Left rail accent line */
.lab-rail-line {
  background: linear-gradient(180deg, #2dd4bf 0%, #a78bfa 50%, transparent 100%);
  width: 3px;
  border-radius: 2px;
}

/* Card hover lift */
.lab-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.lab-card:hover {
  transform: translateY(-4px) rotate(-0.25deg);
  box-shadow: 0 24px 48px -12px var(--lab-glow);
}

/* Staggered article offset on desktop */
@media (min-width: 1024px) {
  .lab-stagger-2 {
    margin-top: 2.5rem;
  }
  .lab-stagger-3 {
    margin-top: 5rem;
  }
}

/* Prose for articles */
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1rem 1.25rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body code {
  font-size: 0.9em;
  background: #1e293b;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #5eead4;
}

.article-body pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

/* Mobile drawer */
#mobile-drawer {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#mobile-drawer:not(.is-open) {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

/* FAQ <details> chevron */
details[open] summary .faq-chevron {
  transform: rotate(45deg);
}

/* Focus ring accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}
