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

:root {
  /* Base */
  --bg: #0A0D10;
  --primary: #18D2B2;
  --primary-hover: #20E8C6;
  --primary-muted: rgba(24,210,178,0.15);

  /* Surfaces */
  --surface: #12161B;
  --surface-elevated: #1A1F26;
  --surface-overlay: rgba(18,22,27,0.85);

  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-focus: var(--primary);

  /* Text */
  --text-primary: #F1F3F5;
  --text-secondary: #8B939E;
  --text-tertiary: #565D67;
  --text-inverse: #0A0D10;

  /* Semantic */
  --success: #34D399;
  --success-muted: rgba(52,211,153,0.15);
  --warning: #FBBF24;
  --warning-muted: rgba(251,191,36,0.15);
  --error: #F87171;
  --error-muted: rgba(248,113,113,0.15);
  --info: #60A5FA;
  --info-muted: rgba(96,165,250,0.15);

  /* Typography */
  --font-body: 'Sen', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Spacing */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.7);

  --shadow-glow-primary: 0 0 20px rgba(24,210,178,0.2);
  --shadow-glow-error: 0 0 16px rgba(248,113,113,0.2);
  --shadow-glow-success: 0 0 16px rgba(52,211,153,0.2);

  /* Blur */
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;

  /* Motion */
  --duration-instant: 50ms;
  --duration-fast: 100ms;
  --duration-normal: 150ms;
  --duration-slow: 250ms;
  --duration-slower: 400ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Shared nav */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  backdrop-filter: blur(var(--blur-md));
}
.ds-nav-logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.ds-nav-links { display: flex; gap: var(--space-1); }
.ds-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}
.ds-nav-link:hover { color: var(--text-primary); background: var(--surface); }
.ds-nav-link.active { color: var(--primary); background: var(--primary-muted); font-weight: var(--weight-medium); }

/* Layout */
.ds-page { max-width: 960px; margin: 0 auto; padding: var(--space-10) var(--space-6) var(--space-16); }
.ds-page-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}
.ds-page-desc {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-12);
}

/* Sections */
.ds-section { margin-bottom: var(--space-16); }
.ds-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.ds-section-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.ds-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

/* Component showcase */
.ds-showcase {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  margin-bottom: var(--space-4);
}
.ds-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.ds-col { display: flex; flex-direction: column; gap: var(--space-3); }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }

/* Attribution */
.ds-attribution {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  opacity: 0.6;
  text-decoration: none;
  z-index: 200;
}
.ds-attribution:hover { opacity: 1; }

/* Animations */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(24,210,178,0.15); }
  50% { box-shadow: 0 0 20px rgba(24,210,178,0.25); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes indeterminate {
  0% { left: -40%; }
  100% { left: 100%; }
}
@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
