/* ============================================================================
   ADAPTIVE DENSITY PORTFOLIO - VISUAL STYLE SYSTEM
   Monochrome Technical Data Visualization Aesthetic
   ============================================================================ */

/* ----------------------------------------------------------------------------
   COLOR SYSTEM
   ---------------------------------------------------------------------------- */
:root {
  /* Base Colors - Monochrome Palette */
  --color-bg-primary: #1a1a1a;
  --color-bg-secondary: #0f0f0f;
  --color-bg-tertiary: #252525;
  
  /* Foreground Colors */
  --color-fg-primary: #ffffff;
  --color-fg-secondary: #cccccc;
  --color-fg-tertiary: #999999;
  --color-fg-quaternary: #666666;
  --color-fg-ghost: #444444;
  
  /* Accent - Used sparingly for emphasis */
  --color-accent: #ffffff;
  
  /* Opacity Levels */
  --opacity-full: 1.0;
  --opacity-high: 0.9;
  --opacity-medium: 0.6;
  --opacity-low: 0.4;
  --opacity-ghost: 0.2;
  --opacity-whisper: 0.08;
  --opacity-trace: 0.03;
  
  /* Grid & Lines */
  --color-grid: rgba(255, 255, 255, 0.015);
  --color-line-subtle: rgba(255, 255, 255, 0.1);
  --color-line-medium: rgba(255, 255, 255, 0.25);
  --color-line-strong: rgba(255, 255, 255, 0.4);
  
  /* Particles & Points */
  --color-particle-dim: rgba(180, 180, 180, 0.3);
  --color-particle-mid: rgba(220, 220, 220, 0.6);
  --color-particle-bright: rgba(255, 255, 255, 0.9);
  
  /* Glows */
  --glow-subtle: rgba(255, 255, 255, 0.15);
  --glow-medium: rgba(255, 255, 255, 0.25);
  --glow-strong: rgba(255, 255, 255, 0.4);
}

/* ----------------------------------------------------------------------------
   TYPOGRAPHY
   ---------------------------------------------------------------------------- */
:root {
  /* Font Families */
  --font-mono: 'Courier New', 'Courier', monospace;
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Font Sizes */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-4xl: 60px;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.4;
  --leading-relaxed: 1.6;
  --leading-loose: 1.8;
  
  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
}

/* Base Typography */
body {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--color-fg-primary);
  background: var(--color-bg-primary);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

/* Text Opacity Utilities */
.text-full { opacity: var(--opacity-full); }
.text-high { opacity: var(--opacity-high); }
.text-medium { opacity: var(--opacity-medium); }
.text-low { opacity: var(--opacity-low); }
.text-ghost { opacity: var(--opacity-ghost); }

/* Letter Spacing */
.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }

/* ----------------------------------------------------------------------------
   LAYOUT SYSTEM
   ---------------------------------------------------------------------------- */
:root {
  /* Spacing Scale */
  --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;
  --space-20: 80px;
  --space-24: 96px;
  
  /* Edge Margins */
  --margin-edge: 20px;
  --margin-edge-mobile: 16px;
  
  /* Max Widths */
  --max-width-prose: 600px;
  --max-width-content: 1200px;
  --max-width-wide: 1600px;
}

/* Container */
.container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--margin-edge);
}

.container-wide {
  max-width: var(--max-width-wide);
}

.container-prose {
  max-width: var(--max-width-prose);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

/* ----------------------------------------------------------------------------
   TECHNICAL UI COMPONENTS
   ---------------------------------------------------------------------------- */

/* Overlay Panels */
.overlay-panel {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--color-fg-primary);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  pointer-events: none;
}

.overlay-panel.top-left {
  top: var(--margin-edge);
  left: var(--margin-edge);
}

.overlay-panel.top-right {
  top: var(--margin-edge);
  right: var(--margin-edge);
  text-align: right;
}

.overlay-panel.bottom-left {
  bottom: var(--margin-edge);
  left: var(--margin-edge);
  max-width: 300px;
}

.overlay-panel.bottom-right {
  bottom: var(--margin-edge);
  right: var(--margin-edge);
  text-align: right;
}

/* Panel Headers */
.panel-header {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
  opacity: var(--opacity-full);
  text-transform: uppercase;
}

/* Metrics Display */
.metric {
  margin: var(--space-1) 0;
  opacity: var(--opacity-high);
  font-size: var(--text-xs);
}

.metric-label {
  opacity: var(--opacity-low);
  margin-right: var(--space-2);
  text-transform: uppercase;
}

.metric-value {
  opacity: var(--opacity-full);
  font-weight: normal;
}

/* Data Bars */
.data-bar {
  display: inline-block;
  height: 4px;
  background: var(--color-line-medium);
  margin-left: var(--space-2);
  position: relative;
  vertical-align: middle;
}

.data-bar-fill {
  height: 100%;
  background: var(--color-fg-primary);
  transition: width 0.3s ease;
}

/* Status Indicators */
.status-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: var(--space-1);
}

.status-active {
  background: var(--color-fg-primary);
  opacity: var(--opacity-full);
}

.status-inactive {
  background: var(--color-fg-primary);
  opacity: var(--opacity-ghost);
}

/* Technical Labels */
.tech-label {
  font-size: var(--text-xs);
  opacity: var(--opacity-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ----------------------------------------------------------------------------
   BACKGROUND ELEMENTS
   ---------------------------------------------------------------------------- */

/* Subtle Grid Overlay */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.grid-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Canvas Container */
.canvas-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ----------------------------------------------------------------------------
   CONTENT SECTIONS
   ---------------------------------------------------------------------------- */

/* Section */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-20) 0;
}

.section-header {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.section-description {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  opacity: var(--opacity-medium);
  max-width: var(--max-width-prose);
}

/* Project Card */
.project-card {
  position: relative;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-line-subtle);
  padding: var(--space-6);
  transition: border-color 0.2s ease;
}

.project-card:hover {
  border-color: var(--color-line-medium);
}

.project-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.project-meta {
  font-size: var(--text-xs);
  opacity: var(--opacity-low);
  margin-bottom: var(--space-4);
}

.project-description {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  opacity: var(--opacity-medium);
}

/* ----------------------------------------------------------------------------
   INTERACTIVE ELEMENTS
   ---------------------------------------------------------------------------- */

/* Links */
a {
  color: var(--color-fg-primary);
  text-decoration: none;
  opacity: var(--opacity-medium);
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: var(--opacity-full);
}

/* Buttons */
.btn {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: 1px solid var(--color-line-medium);
  color: var(--color-fg-primary);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--color-fg-primary);
  background: var(--color-fg-primary);
  color: var(--color-bg-primary);
}

/* ----------------------------------------------------------------------------
   VISUALIZATION SPECIFIC
   ---------------------------------------------------------------------------- */

/* Particle Field Container */
.particle-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Funnel Visualization */
.funnel-viz {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Data Point */
.data-point {
  width: 2px;
  height: 2px;
  background: var(--color-particle-bright);
  border-radius: 50%;
  position: absolute;
  opacity: var(--opacity-medium);
}

/* ----------------------------------------------------------------------------
   UTILITIES
   ---------------------------------------------------------------------------- */

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

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

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

/* Pointer Events */
.pointer-none { pointer-events: none; }
.pointer-auto { pointer-events: auto; }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* ----------------------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --margin-edge: var(--margin-edge-mobile);
  }
  
  .section-header {
    font-size: var(--text-xl);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .overlay-panel.bottom-left,
  .overlay-panel.bottom-right {
    max-width: calc(100vw - 32px);
  }
}

/* ----------------------------------------------------------------------------
   ANIMATION
   ---------------------------------------------------------------------------- */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

.slide-up {
  animation: slideUp 0.8s ease;
}

/* Smooth Transitions */
.transition-all { transition: all 0.3s ease; }
.transition-opacity { transition: opacity 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }