/* CCA-Q2 — Design System */
:root {
  /* Anthropic-inspired palette */
  --bg: #0f1117;
  --bg-card: #1a1c25;
  --bg-card-hover: #22252f;
  --bg-surface: #151720;
  --border: #2a2d3a;
  --border-hover: #3d4155;

  --text: #e8e9ed;
  --text-secondary: #9ca0b0;
  --text-muted: #6b7085;

  --accent: #d4734c;
  --accent-hover: #e0845f;
  --accent-subtle: rgba(212, 115, 76, 0.12);

  --success: #4ade80;
  --success-subtle: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --warning-subtle: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-subtle: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-subtle: rgba(96, 165, 250, 0.12);

  /* Domain colors */
  --d1: #f97316; /* Agentic Architecture */
  --d2: #8b5cf6; /* Tool Design & MCP */
  --d3: #06b6d4; /* Claude Code */
  --d4: #10b981; /* Prompt Engineering */
  --d5: #ec4899; /* Context & Reliability */

  --d1-subtle: rgba(249, 115, 22, 0.12);
  --d2-subtle: rgba(139, 92, 246, 0.12);
  --d3-subtle: rgba(6, 182, 212, 0.12);
  --d4-subtle: rgba(16, 185, 129, 0.12);
  --d5-subtle: rgba(236, 72, 153, 0.12);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--accent-hover); }

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; }
h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-brand span {
  color: var(--accent);
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand-sep {
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 2px;
}

.nav-brand-site {
  color: #38bdf8;
  font-weight: 600;
  font-size: 1rem;
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}

.nav-brand-site:hover {
  color: #7dd3fc;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
}

.nav-links a {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

/* Hamburger menu for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-d1 { background: var(--d1-subtle); color: var(--d1); }
.badge-d2 { background: var(--d2-subtle); color: var(--d2); }
.badge-d3 { background: var(--d3-subtle); color: var(--d3); }
.badge-d4 { background: var(--d4-subtle); color: var(--d4); }
.badge-d5 { background: var(--d5-subtle); color: var(--d5); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.65em 1.4em;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-card); }

/* Progress bar */
.progress {
  height: 6px;
  background: var(--bg-surface);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.5s var(--ease);
}

/* Hero section */
.hero {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

/* Section */
.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* Tag / Chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.25em 0.65em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Code block */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: var(--space-2xl) 0; }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s var(--ease) both;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Scroll indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}
