/* ═══════════════════════════════════════════════════════════════════════════
   jbcom Design System - CSS Implementation
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  /* ═══════════════════════════════════════════════════════════════════════
     BACKGROUNDS
     ═══════════════════════════════════════════════════════════════════════ */
  --bg-default: #0a0f1a; /* Page background - deep navy */
  --bg-paper: #111827; /* Cards, elevated surfaces */
  --bg-elevated: #1e293b; /* Hover states, highlighted areas */

  /* ═══════════════════════════════════════════════════════════════════════
     PRIMARY - CYAN
     ═══════════════════════════════════════════════════════════════════════ */
  --primary: #06b6d4; /* Primary actions, links, accents */
  --primary-light: #22d3ee; /* Hover states */
  --primary-dark: #0891b2; /* Active/pressed states */

  /* ═══════════════════════════════════════════════════════════════════════
     SECONDARY - BLUE
     ═══════════════════════════════════════════════════════════════════════ */
  --secondary: #3b82f6; /* Secondary actions */
  --secondary-light: #60a5fa; /* Hover states */
  --secondary-dark: #2563eb; /* Active states */

  /* ═══════════════════════════════════════════════════════════════════════
     TEXT
     ═══════════════════════════════════════════════════════════════════════ */
  --text-primary: #f1f5f9; /* Headings, primary text - near white */
  --text-secondary: #94a3b8; /* Body text, descriptions - gray */
  --text-disabled: #475569; /* Disabled elements - dark gray */

  /* ═══════════════════════════════════════════════════════════════════════
     DIVIDERS & BORDERS
     ═══════════════════════════════════════════════════════════════════════ */
  --divider: #1e293b;
  --border: #1e293b;

  /* ═══════════════════════════════════════════════════════════════════════
     SEMANTIC COLORS
     ═══════════════════════════════════════════════════════════════════════ */
  --success: #10b981; /* Success states - green */
  --warning: #f59e0b; /* Warnings - amber */
  --error: #ef4444; /* Errors - red */
  --info: #06b6d4; /* Info - cyan (same as primary) */

  /* ═══════════════════════════════════════════════════════════════════════
     CATEGORY COLORS (for ecosystem)
     ═══════════════════════════════════════════════════════════════════════ */
  --cat-ai: #8b5cf6; /* AI & Agents - purple */
  --cat-games: #06b6d4; /* Game Development - cyan */
  --cat-infra: #10b981; /* Infrastructure - green */
  --cat-libs: #f59e0b; /* Libraries - amber */

  /* ═══════════════════════════════════════════════════════════════════════
     LANGUAGE COLORS (for ecosystem)
     ═══════════════════════════════════════════════════════════════════════ */
  --lang-typescript: #3178c6;
  --lang-python: #3776ab;
  --lang-go: #00add8;
  --lang-terraform: #7b42bc;
  --lang-rust: #dea584;

  /* ═══════════════════════════════════════════════════════════════════════
     TYPOGRAPHY
     ═══════════════════════════════════════════════════════════════════════ */
  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  /* ═══════════════════════════════════════════════════════════════════════
     SPACING
     ═══════════════════════════════════════════════════════════════════════ */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* ═══════════════════════════════════════════════════════════════════════
     BORDER RADIUS
     ═══════════════════════════════════════════════════════════════════════ */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-default);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-light);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

code {
  background: var(--bg-paper);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--bg-paper);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
}

.overline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-lg {
  padding: var(--space-3xl) 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

header {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
}

.wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

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

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS & COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
}

.btn-outlined {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outlined:hover {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary-light);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHIPS/TAGS
   ═══════════════════════════════════════════════════════════════════════════ */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.chip-outlined {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.chip-filled {
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary);
  border: none;
}

/* Language chips */
.chip-typescript {
  background: rgba(49, 120, 198, 0.15);
  color: var(--lang-typescript);
}

.chip-python {
  background: rgba(55, 118, 171, 0.15);
  color: var(--lang-python);
}

.chip-go {
  background: rgba(0, 173, 216, 0.15);
  color: var(--lang-go);
}

.chip-terraform {
  background: rgba(123, 66, 188, 0.15);
  color: var(--lang-terraform);
}

.chip-rust {
  background: rgba(222, 165, 132, 0.15);
  color: var(--lang-rust);
}

/* Release status chips */
.chip-production {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.chip-beta {
  background: rgba(59, 130, 246, 0.15);
  color: var(--secondary);
}

.chip-alpha {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRID SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

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

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.text-primary {
  color: var(--text-primary);
}
.text-secondary {
  color: var(--text-secondary);
}
.text-disabled {
  color: var(--text-disabled);
}
.text-center {
  text-align: center;
}

.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);
}
.mb-2xl {
  margin-bottom: var(--space-2xl);
}

.mt-sm {
  margin-top: var(--space-sm);
}
.mt-md {
  margin-top: var(--space-md);
}
.mt-lg {
  margin-top: var(--space-lg);
}
.mt-xl {
  margin-top: var(--space-xl);
}
.mt-2xl {
  margin-top: var(--space-2xl);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

footer {
  background: var(--bg-paper);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-paper);
}

::-webkit-scrollbar-thumb {
  background: var(--text-disabled);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--text-disabled) var(--bg-paper);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }
  .section-lg {
    padding: var(--space-2xl) 0;
  }

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

  .container,
  .container-wide {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }

  .header-content {
    padding: var(--space-sm) var(--space-md);
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .wordmark {
    font-size: 1.125rem;
  }

  nav {
    gap: var(--space-sm);
    font-size: 0.875rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   QR CODE HOVER EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */

.qr-code-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.qr-code-image:hover {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKIP LINK
   ═══════════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 16px;
  background: var(--bg-paper);
  color: var(--primary);
  padding: var(--space-md);
  z-index: 9999;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  font-weight: 700;
  transition: top 0.3s ease-in-out;
}

.skip-link:focus {
  top: 16px;
  outline: none;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESUME PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-section {
  margin-bottom: 2rem;
}

.job-entry {
  margin-bottom: 1.5rem;
}

.job-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.company {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.period {
  font-size: 0.875rem;
  color: var(--text-disabled);
  margin-bottom: 0.75rem;
}

.job-description {
  margin: 0;
  padding-left: 1.25rem;
}

.job-description li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}
