/*
 * Cyberchill Design System — Main Stylesheet
 * Based on DESIGN.md color tokens, typography, and spacing.
 *
 * Fonts: Space Grotesk (UI/Editorial), Space Mono (Technical/Code),
 *        Pixelify Sans (Display pixel headings)
 */

/* ────────────────────────────────────────────
   0. CSS CUSTOM PROPERTIES (Design Tokens)
   ──────────────────────────────────────────── */
:root {
  /* Colors */
  --ink-950: #031116;
  --ink-900: #071C22;
  --acid-500: #D0FF00;
  --paper-50: #FAFAF8;
  --paper-100: #F0F2EF;
  --white: #FFFFFF;
  --text-strong: #07171C;
  --text-muted: #536168;
  --text-on-dark: #F2F5F4;
  --muted-on-dark: #B7C3C5;
  --line-light: #CDD3D2;
  --line-dark: #34454A;

  /* Extended palette from Stitch */
  --surface: #06151a;
  --surface-container-low: #0f1e23;
  --surface-container: #132227;
  --surface-container-high: #1d2c32;
  --surface-container-highest: #28373d;
  --on-surface: #d5e5ec;
  --on-surface-variant: #c4c9ac;
  --secondary: #b5cad2;
  --outline: #8e9378;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --gutter: 1.5rem;
  --gutter-mobile: 1rem;
  --margin: 3rem;
  --margin-tablet: 2rem;
  --margin-mobile: 1.25rem;

  /* Layout */
  --max-width: 1280px;
}

/* ────────────────────────────────────────────
   1. RESET & BASE
   ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection {
  background-color: var(--acid-500);
  color: var(--text-strong);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ────────────────────────────────────────────
   2. TYPOGRAPHY
   ──────────────────────────────────────────── */
.font-pixel {
  font-family: 'Pixelify Sans', 'Space Grotesk', monospace;
}

.font-mono {
  font-family: 'Space Mono', 'IBM Plex Mono', monospace;
}

.font-grotesk {
  font-family: 'Space Grotesk', Arial, sans-serif;
}

/* Display */
.text-display-hero {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 64px;
}

.text-display-hero-mobile {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
}

/* Headlines */
.text-headline-lg {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
}

.text-headline-md {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.text-headline-sm {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

/* Body */
.text-body-lg {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.text-body-md {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.text-body-sm {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

/* Labels */
.text-label-code {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-label-meta {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

/* ────────────────────────────────────────────
   3. LAYOUT UTILITIES
   ──────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-mobile);
  padding-right: var(--margin-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--margin-tablet);
    padding-right: var(--margin-tablet);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--margin);
    padding-right: var(--margin);
  }
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .md-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .md-grid-cols-12 {
    grid-template-columns: repeat(12, 1fr);
  }
}

@media (min-width: 1024px) {
  .lg-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .lg-grid-cols-12 {
    grid-template-columns: repeat(12, 1fr);
  }
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-4 {
  grid-column: span 4;
}

/* ────────────────────────────────────────────
   4. HEADER
   ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  background-color: var(--ink-950);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 var(--margin-tablet);
  }
}

@media (min-width: 1024px) {
  .header-inner {
    padding: 0 var(--margin);
  }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-logo span {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--white);
  text-transform: lowercase;
}

/* Desktop nav */
.header-nav {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

.header-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: color 0.2s;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover {
  color: var(--white);
}

.header-nav a.active {
  color: var(--acid-500);
  font-weight: 600;
  border-bottom-color: var(--acid-500);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.btn-github {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--line-dark);
  color: var(--acid-500);
  display: none;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

@media (min-width: 768px) {
  .btn-github {
    display: flex;
  }
}

.btn-github:hover {
  background-color: var(--acid-500);
  color: var(--text-strong);
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  background-color: var(--ink-950);
  padding: var(--space-md) var(--gutter-mobile);
  border-top: 1px solid var(--line-dark);
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(52, 69, 74, 0.6);
}

.mobile-drawer-header span:first-child {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--acid-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-drawer nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--on-surface);
  transition: color 0.2s;
}

.mobile-drawer nav a:hover,
.mobile-drawer nav a.active {
  color: var(--acid-500);
}

.mobile-drawer nav a.active {
  font-weight: 700;
  background-color: var(--surface-container-high);
}

.mobile-drawer nav a .nav-number {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-right: var(--space-sm);
}

/* ────────────────────────────────────────────
   5. FOOTER
   ──────────────────────────────────────────── */
.site-footer {
  width: 100%;
  background-color: var(--ink-950);
  border-top: 1px solid var(--line-dark);
  padding: var(--space-xl) 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--secondary);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--margin-tablet);
  }
}

@media (min-width: 1024px) {
  .footer-inner {
    padding: 0 var(--margin);
  }
}

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-left .copyright {
  color: var(--white);
  font-weight: 500;
}

.footer-left .divider {
  color: var(--line-dark);
}

.footer-left .author {
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.footer-right a {
  color: var(--secondary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-right a:hover {
  color: var(--acid-500);
}

.footer-top-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--secondary);
  margin-left: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 1px solid var(--line-dark);
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-top-btn:hover {
  color: var(--acid-500);
}

/* ────────────────────────────────────────────
   6. DOT GRID BACKGROUND
   ──────────────────────────────────────────── */
.dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--on-surface) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.15;
}

.dot-grid-dark {
  background-image: radial-gradient(var(--text-strong) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.1;
}

.dot-grid-paper {
  background-image: radial-gradient(var(--text-strong) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.2;
}

/* ────────────────────────────────────────────
   7. BUTTONS & LINKS
   ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--acid-500);
  color: var(--text-strong);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: var(--white);
  color: var(--text-strong);
}

.btn-primary.full-width {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
  transition: color 0.2s;
}

.link-mono {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

/* ────────────────────────────────────────────
   8. SECTION BACKGROUNDS
   ──────────────────────────────────────────── */
.bg-ink-950 {
  background-color: var(--ink-950);
}

.bg-ink-900 {
  background-color: var(--ink-900);
}

.bg-acid {
  background-color: var(--acid-500);
}

.bg-paper-50 {
  background-color: var(--paper-50);
}

.bg-paper-100 {
  background-color: var(--paper-100);
}

.bg-white {
  background-color: var(--white);
}

.bg-surface {
  background-color: var(--surface);
}

.bg-surface-container-low {
  background-color: var(--surface-container-low);
}

/* ────────────────────────────────────────────
   9. COLOR UTILITIES
   ──────────────────────────────────────────── */
.color-acid {
  color: var(--acid-500);
}

.color-white {
  color: var(--white);
}

.color-text-strong {
  color: var(--text-strong);
}

.color-text-muted {
  color: var(--text-muted);
}

.color-text-on-dark {
  color: var(--text-on-dark);
}

.color-muted-on-dark {
  color: var(--muted-on-dark);
}

.color-secondary {
  color: var(--secondary);
}

.color-on-surface-variant {
  color: var(--on-surface-variant);
}

/* ────────────────────────────────────────────
   10. CARDS
   ──────────────────────────────────────────── */
.card {
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.2s;
}

.card:hover {
  background-color: var(--paper-100);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: var(--ink-950);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  overflow: hidden;
}

.card-thumbnail .placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acid-500);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  border: 1px dashed var(--line-dark);
}

.card-body {
  padding: var(--space-md);
}

.card-category {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.card-author {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: var(--space-md);
  padding-top: 0;
}

.card-arrow {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  color: var(--text-strong);
  transition: transform 0.2s;
  display: inline-block;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

/* Card on dark background */
.card-dark {
  background-color: var(--surface-container-low);
  transition: background-color 0.2s;
}

.card-dark:hover {
  background-color: var(--surface-container);
}

.card-dark .card-title {
  color: var(--text-on-dark);
}

.card-dark .card-category,
.card-dark .card-author {
  color: var(--muted-on-dark);
}

.card-dark .card-excerpt {
  color: var(--muted-on-dark);
}

/* ────────────────────────────────────────────
   11. HERO SECTIONS
   ──────────────────────────────────────────── */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: var(--space-xl) 0;
}

.section-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acid-500);
  margin-bottom: var(--space-xs);
}

/* ────────────────────────────────────────────
   12. STEPPED COLOR BARS
   ──────────────────────────────────────────── */
.color-bars {
  display: flex;
  flex-direction: column;
}

.color-bars>div {
  height: 12px;
  width: 100%;
}

/* ────────────────────────────────────────────
   13. TAG / CHIP
   ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-md);
}

.tag-dark {
  background-color: var(--ink-950);
  color: var(--white);
}

.tag-acid {
  background-color: var(--acid-500);
  color: var(--text-strong);
}

.tag-outline {
  border: 1px solid var(--line-dark);
  color: var(--acid-500);
}

/* ────────────────────────────────────────────
   14. EXPLORE PANEL (Home)
   ──────────────────────────────────────────── */
.explore-panel {
  background-color: var(--white);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.explore-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-size: 16px;
  color: var(--text-strong);
  border-bottom: 1px solid var(--paper-100);
  transition: color 0.2s;
}

.explore-nav a:hover {
  color: var(--outline);
}

/* ────────────────────────────────────────────
   15. APPROACH STEPS
   ──────────────────────────────────────────── */
.step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.step-number {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background-color: var(--acid-500);
  color: var(--text-strong);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

.step-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
}

.step-content p {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--secondary);
  margin-top: 4px;
}

/* Mobile step variant */
@media (max-width: 767px) {
  .step {
    padding: var(--space-sm);
    background-color: var(--surface-container-low);
  }

  .step-content p {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-muted);
  }
}

/* ────────────────────────────────────────────
   16. SYSTEMS STRIP
   ──────────────────────────────────────────── */
.systems-strip {
  background-color: var(--paper-100);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .systems-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ────────────────────────────────────────────
   17. PLACEHOLDER ART (for images not yet available)
   ──────────────────────────────────────────── */
.placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink-900);
  color: var(--acid-500);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  position: relative;
}

.placeholder-art::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line-dark);
}

/* ────────────────────────────────────────────
   18. PIXEL WORDMARK SVG
   ──────────────────────────────────────────── */
.pixel-wordmark {
  width: 100%;
  user-select: none;
  overflow: hidden;
  line-height: 0;
  padding-top: var(--space-md);
}

.pixel-wordmark svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ────────────────────────────────────────────
   19. RESPONSIVE VISIBILITY (moved to bottom)
   ──────────────────────────────────────────── */

/* ────────────────────────────────────────────
   20. FEATURE BADGE (not yet implemented)
   ──────────────────────────────────────────── */
.badge-coming-soon {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--line-dark);
  color: var(--text-muted);
  opacity: 0.7;
}

.not-implemented {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ────────────────────────────────────────────
   21. RESEARCH DETAIL
   ──────────────────────────────────────────── */
.article-hero {
  background-color: var(--ink-950);
  padding: var(--space-xl) 0;
  position: relative;
}

.article-content {
  background-color: var(--paper-50);
  padding: var(--space-xl) 0;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-strong);
}

.article-body p {
  margin-bottom: var(--space-md);
  color: var(--text-strong);
  line-height: 1.75;
}

.article-body code {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  background-color: var(--paper-100);
  padding: 2px 6px;
  border-radius: 2px;
}

.article-sidebar {
  position: sticky;
  top: 96px;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  padding: var(--space-xs) 0;
  border-left: 2px solid var(--line-light);
  padding-left: var(--space-md);
}

.toc-list li:hover {
  border-left-color: var(--acid-500);
}

.toc-list a {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Markdown rendered styles for Articles and Labs */
.article-content pre,
.lab-markdown-content pre {
  background-color: var(--ink-950);
  color: var(--acid-500);
  padding: var(--space-md);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  overflow-x: auto;
  border-radius: 4px;
  margin: var(--space-sm) 0;
  border: 1px solid var(--line-dark);
}

.article-content pre code,
.lab-markdown-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: inherit;
}

.article-content table,
.lab-markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.article-content th,
.lab-markdown-content th,
.article-content td,
.lab-markdown-content td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--line-light);
  text-align: left;
}

.article-content th,
.lab-markdown-content th {
  background-color: var(--paper-100);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.article-content ul,
.lab-markdown-content ul,
.article-content ol,
.lab-markdown-content ol {
  margin: var(--space-sm) 0 var(--space-md) var(--space-lg);
  padding-left: var(--space-sm);
}

.article-content blockquote,
.lab-markdown-content blockquote {
  border-left: 4px solid var(--acid-500);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
  color: var(--text-muted);
  background: var(--paper-100);
  padding: var(--space-sm) var(--space-md);
}

/* ────────────────────────────────────────────
   22. LABS
   ──────────────────────────────────────────── */
.lab-search {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.lab-search input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--surface-container-low);
  border: 1px solid var(--line-dark);
  color: var(--on-surface);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
}

.lab-search input::placeholder {
  color: var(--text-muted);
}

.lab-search input:focus {
  outline: 2px solid var(--acid-500);
  outline-offset: -2px;
}

.lab-detail-section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--line-light);
}

.lab-detail-section:last-child {
  border-bottom: none;
}

/* ────────────────────────────────────────────
   23. PROJECTS
   ──────────────────────────────────────────── */
.project-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--line-light);
}

@media (min-width: 768px) {
  .project-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.project-status {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
}

.project-status.active {
  background-color: var(--acid-500);
  color: var(--text-strong);
}

.project-status.in-progress {
  border: 1px solid var(--acid-500);
  color: var(--acid-500);
}

.project-status.planning {
  border: 1px solid var(--line-dark);
  color: var(--text-muted);
}

.project-components {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.project-component-chip {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--line-light);
  color: var(--text-muted);
}

/* ────────────────────────────────────────────
   24. ABOUT PAGE
   ──────────────────────────────────────────── */
.about-hero {
  background-color: var(--ink-950);
  padding: var(--space-xl) 0;
  min-height: 40vh;
  display: flex;
  align-items: center;
}

.about-section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--line-dark);
}

.about-section:last-child {
  border-bottom: none;
}

.interest-chip {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--line-dark);
  color: var(--on-surface);
  margin-right: var(--space-sm);
  margin-bottom: var(--space-sm);
}

/* ────────────────────────────────────────────
   25. SCROLLBAR
   ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink-950);
}

::-webkit-scrollbar-thumb {
  background: var(--line-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--acid-500);
}

/* ────────────────────────────────────────────
   26. MOBILE BOTTOM NAV
   ──────────────────────────────────────────── */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(3, 17, 22, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.5);
  justify-content: space-around;
  height: 64px;
  padding: 0 var(--space-xs);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 48px;
  color: var(--muted-on-dark);
  transition: color 0.2s;
}

.mobile-bottom-nav a:hover {
  color: var(--text-on-dark);
}

.mobile-bottom-nav a.active {
  color: var(--acid-500);
  font-weight: 700;
}

.mobile-bottom-nav a .nav-icon {
  font-size: 20px;
}

.mobile-bottom-nav a .nav-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Add bottom padding to main when bottom nav visible */
@media (max-width: 767px) {
  main {
    padding-bottom: 80px;
  }
}

/* ────────────────────────────────────────────
   27. UTILITY CLASSES
   ──────────────────────────────────────────── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-stretch {
  align-items: stretch;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.text-center {
  text-align: center;
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.tracking-wide {
  letter-spacing: 0.05em;
}

.tracking-wider {
  letter-spacing: 0.1em;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.leading-tight {
  line-height: 1.25;
}

.leading-snug {
  line-height: 1.375;
}

.leading-relaxed {
  line-height: 1.625;
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.py-sm {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.py-md {
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.py-lg {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.py-xl {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.px-md {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.p-md {
  padding: var(--space-md);
}

.p-lg {
  padding: var(--space-lg);
}

.p-xl {
  padding: var(--space-xl);
}

.border-b-light {
  border-bottom: 1px solid var(--line-light);
}

.border-b-dark {
  border-bottom: 1px solid var(--line-dark);
}

.select-none {
  user-select: none;
}

.shrink-0 {
  flex-shrink: 0;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ────────────────────────────────────────────
   28. RESPONSIVE VISIBILITY
   ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}


/* ────────────────────────────────────────────
   28. RESPONSIVE VISIBILITY
   ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none;
  }
}