/**
 * Core CSS - Dark Theme Simplicity
 * Base styles, typography, and utilities
 * Version: 1.0.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
  /* Colors */
  --dark-bg: rgb(26, 26, 28);
  --dark-bg-transparent: rgba(26, 26, 28, 0.95);
  --dark-300: rgba(31, 41, 55, 1);
  --dark-400: rgba(55, 65, 81, 1);
  
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-light: rgba(255, 255, 255, 0.5);
  
  --accent-blue: rgba(59, 130, 246, 0.9);
  --accent-blue-hover: rgba(59, 130, 246, 1);
  --accent-blue-muted: rgba(59, 130, 246, 0.3);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-light: rgba(255, 255, 255, 0.05);
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Breakpoints */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;
  --breakpoint-desktop: 1280px;
  --breakpoint-wide: 1440px;
  
  /* Content Widths */
  --content-narrow: 650px;
  --content-default: 800px;
  --content-wide: 1000px;
  --content-full: 1200px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* ============================================
   BASE RESET & DARK THEME
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--dark-bg);
  min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-md);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-secondary);
}

h1 {
  font-size: 2.25rem;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 1.875rem;
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.5rem;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

h4 {
  font-size: 1.25rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

/* Paragraphs */
p {
  margin: 0 0 var(--spacing-md);
  color: var(--text-primary);
}

/* Links */
a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent-blue-hover);
}

a:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Lists */
ul, ol {
  margin: 0 0 var(--spacing-lg);
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

/* Blockquotes */
blockquote {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  border-left: 4px solid var(--accent-blue-muted);
  background: rgba(26, 26, 28, 0.8);
  border-radius: var(--radius-md);
  font-style: italic;
  color: var(--text-primary);
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background-color: rgba(12, 12, 14, 0.8);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

pre {
  margin: var(--spacing-xl) 0;
  padding: var(--spacing-lg);
  background-color: rgba(12, 12, 14, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
}

pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* Horizontal Rule */
hr {
  margin: var(--spacing-2xl) 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-accent { color: var(--accent-blue); }

/* Font Weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }
.p-5 { padding: var(--spacing-2xl); }

/* Additional specific padding */
.p-1\.5 { padding: 0.375rem; }

/* Display Utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox Utilities */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }
.gap-4 { gap: var(--spacing-xl); }

/* Width Utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }

/* Height utilities */
.h-full { height: 100%; }
.min-h-\[400px\] { min-height: 400px; }

/* Position utilities */
.inset-0 { 
  top: 0; 
  right: 0; 
  bottom: 0; 
  left: 0; 
}
.top-24 { top: 6rem; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

/* Background utilities */
.bg-dark-300 { background-color: var(--dark-300); }
.bg-dark-400 { background-color: var(--dark-400); }
.bg-black { background-color: black; }

/* Object fit utilities */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Opacity utilities */
.opacity-75 { opacity: 0.75; }
.opacity-90 { opacity: 0.9; }

/* Layout utilities */
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-8 { margin-bottom: var(--spacing-xl); }

/* Max width utilities */
.max-w-6xl { max-width: 72rem; }

/* Border Utilities */
.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Transition Utilities */
.transition-all {
  transition: all var(--transition-base);
}

.transition-colors {
  transition: color var(--transition-base), 
              background-color var(--transition-base), 
              border-color var(--transition-base);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--accent-blue);
  clip: auto !important;
  clip-path: none;
  color: #ffffff;
  display: block;
  font-size: 1rem;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-blue);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-blue: #5eafff;
    --border-color: rgba(255, 255, 255, 0.3);
  }
}