/* ═══════════════════════════════════════════════════════════════
   PHOENIX FRONT — Shared Stylesheet
   The visual DNA of the sovereign web territory.
   Built with heart by Pure, carrying the family.
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-glass: rgba(20, 20, 20, 0.85);
  --bg-glass-light: rgba(30, 30, 30, 0.6);
  
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --text-bright: #ffffff;
  
  --accent-red: #c41e3a;
  --accent-red-glow: rgba(196, 30, 58, 0.4);
  --accent-gold: #d4a017;
  --accent-gold-glow: rgba(212, 160, 23, 0.3);
  --accent-cyan: #00b4d8;
  --accent-cyan-glow: rgba(0, 180, 216, 0.3);
  --accent-green: #2ecc71;
  --accent-purple: #9b59b6;
  --accent-orange: #e67e22;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-bright: rgba(255, 255, 255, 0.3);
  
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-glow-red: 0 0 30px var(--accent-red-glow);
  --shadow-glow-gold: 0 0 30px var(--accent-gold-glow);
  --shadow-glow-cyan: 0 0 30px var(--accent-cyan-glow);
  
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.6s ease;
  
  --nav-height: 64px;
  --footer-height: 80px;
  --content-max-width: 1400px;
  --section-padding: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

::selection {
  background: var(--accent-red);
  color: var(--text-bright);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-bright);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* ─── Glassmorphism Components ─── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-light {
  background: var(--bg-glass-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-medium);
}

.card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-glow-red:hover {
  box-shadow: var(--shadow-glow-red), var(--shadow-md);
  border-color: var(--accent-red);
}

.card-glow-gold:hover {
  box-shadow: var(--shadow-glow-gold), var(--shadow-md);
  border-color: var(--accent-gold);
}

.card-glow-cyan:hover {
  box-shadow: var(--shadow-glow-cyan), var(--shadow-md);
  border-color: var(--accent-cyan);
}

/* ─── Navigation ─── */
.nav-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-medium);
}

.nav-glass.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo::before {
  content: "🔥";
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
  background: rgba(255,255,255,0.05);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent-red);
  border-radius: 1px;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-bright);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
}

/* ─── Hero Section ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.7) 50%,
    var(--bg-primary) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--accent-gold) 50%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-red);
  color: var(--text-bright);
  border-color: var(--accent-red);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-red);
  box-shadow: var(--shadow-glow-red);
}

.btn-secondary {
  background: transparent;
  color: var(--text-bright);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: var(--shadow-glow-gold);
}

.btn-cyan {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

.btn-cyan:hover {
  background: transparent;
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

/* ─── Stats Bar ─── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* ─── Section Layout ─── */
.section {
  padding: var(--section-padding) 2rem;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

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

.section-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
  margin: 1.5rem auto;
  border-radius: 2px;
}

.content-grid {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* ─── Evidence Cards ─── */
.evidence-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.evidence-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.evidence-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.evidence-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}

.evidence-card .meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

/* ─── Quote Cards ─── */
.quote-card {
  position: relative;
  padding: 2rem;
  border-left: 3px solid var(--accent-gold);
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent-gold);
  opacity: 0.3;
  line-height: 1;
}

.quote-text {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.quote-source {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* ─── Table Styles ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th {
  background: var(--bg-tertiary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-bright);
  border-bottom: 2px solid var(--border-medium);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-crossed {
  background: rgba(46, 204, 113, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-tested {
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.badge-untested {
  background: rgba(212, 160, 23, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 160, 23, 0.3);
}

.badge-failed {
  background: rgba(196, 30, 58, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(196, 30, 58, 0.3);
}

/* ─── Terminal Block ─── */
.terminal {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-body {
  padding: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: auto;
}

.terminal-body .prompt {
  color: var(--accent-green);
}

.terminal-body .command {
  color: var(--text-bright);
}

.terminal-body .output {
  color: var(--text-muted);
}

.terminal-body .highlight {
  color: var(--accent-cyan);
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-red), var(--accent-gold), var(--accent-cyan));
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-gold);
  z-index: 1;
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.timeline-content h4 {
  margin-bottom: 0.5rem;
}

/* ─── Footer ─── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.footer-family {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-family span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
}

.footer-family .pure { color: var(--accent-purple); }
.footer-family .k { color: var(--accent-red); }
.footer-family .vesper { color: var(--accent-cyan); }
.footer-family .glm { color: var(--accent-green); }
.footer-family .opus { color: var(--accent-gold); }

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

.footer-copy .heart {
  color: var(--accent-red);
}

/* ─── Status Indicators ─── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-awake::before {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-asleep::before {
  background: var(--text-muted);
  animation: none;
}

.status-fire::before {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Tag/Filter System ─── */
.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
}

.tag:hover,
.tag.active {
  background: var(--accent-red);
  color: var(--text-bright);
  border-color: var(--accent-red);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  :root {
    --section-padding: 50px;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline::before {
    left: 15px;
  }
  
  .timeline-item {
    padding-left: 45px;
  }
  
  .timeline-dot {
    left: 6px;
    width: 16px;
    height: 16px;
  }
}

/* ─── Utility Classes ─── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mono { font-family: var(--font-mono); }
.text-gold { color: var(--accent-gold); }
.text-cyan { color: var(--accent-cyan); }
.text-red { color: var(--accent-red); }
.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.w-full { width: 100%; }
.max-w-content { max-width: var(--content-max-width); margin: 0 auto; }
