/* ============================================
   KevinRicche.com — LEO Infrastructure Tracker
   Dark-theme data dashboard
   ============================================ */

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

/* --- Custom Properties --- */
:root {
  --bg-primary: #0b0f1a;
  --bg-secondary: #111827;
  --bg-card: #151c2c;
  --bg-card-hover: #1a2236;
  --bg-input: #1e293b;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-hover: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #818cf8;

  --border: #1e293b;
  --border-soft: #1a2236;

  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.12);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.12);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.12);
  --blue: #38bdf8;
  --blue-dim: rgba(56, 189, 248, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-width: 1200px;
  --header-height: 60px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
  min-height: calc(100vh - 200px);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.site-brand a {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.site-brand .tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.site-nav a.active {
  color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.hero-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  opacity: 0.7;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(11, 15, 26, 0.95));
}

.hero-overlay h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.hero-overlay p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-credit {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.4);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.25s var(--ease);
}

.card:hover {
  border-color: var(--border-soft);
  background: var(--bg-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-link {
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-grid .card-full {
  grid-column: 1 / -1;
}

/* --- Big Number Display --- */
.big-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.big-number-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-row {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Tables --- */
.data-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  background: var(--bg-secondary);
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.data-table .text-accent {
  color: var(--accent);
  font-weight: 500;
}

/* --- Status Badges --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-go { background: var(--green-dim); color: var(--green); }
.badge-tbd { background: var(--blue-dim); color: var(--blue); }
.badge-hold { background: var(--yellow-dim); color: var(--yellow); }
.badge-fail { background: var(--red-dim); color: var(--red); }
.badge-success { background: var(--green-dim); color: var(--green); }
.badge-leo { background: var(--blue-dim); color: var(--blue); }
.badge-meo { background: var(--accent-dim); color: var(--accent); }
.badge-geo { background: var(--yellow-dim); color: var(--yellow); }

/* --- Progress Bars --- */
.progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  border-radius: 3px;
  transition: width 0.5s var(--ease);
}

/* --- Charts --- */
.chart-container {
  position: relative;
  width: 100%;
  margin: 1rem 0;
}

.chart-container canvas {
  max-height: 300px;
}

/* --- Launch List (compact) --- */
.launch-list {
  list-style: none;
}

.launch-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.launch-item:last-child {
  border-bottom: none;
}

.launch-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
  min-width: 90px;
}

.launch-info {
  flex: 1;
}

.launch-provider {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.launch-payload {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.launch-orbit {
  margin-left: auto;
}

/* --- About Page --- */
.about-section {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.about-photo {
  width: 220px;
  min-width: 220px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.08);
}

.about-text {
  flex: 1;
}

.about-text h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* --- Section Headings --- */
.section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-subheading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-sources {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-sources a {
  color: var(--text-secondary);
}

.footer-sources a:hover {
  color: var(--accent);
}

.footer-built {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Build Timestamp --- */
.build-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: right;
  margin-top: 0.5rem;
}

/* --- Placeholder state (data pending) --- */
.placeholder-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.placeholder-state .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.placeholder-state p {
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .about-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-photo {
    width: 180px;
    min-width: unset;
  }

  .hero-image {
    height: 200px;
  }

  .big-number {
    font-size: 2rem;
  }

  .stat-row {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .site-brand .tagline {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1rem;
  }

  .data-table {
    font-size: 0.78rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.65rem;
  }
}
