/* ============================================
   ASH Cosmology - Main Stylesheet
   ============================================ */

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

:root {
  --deep-space: #0a0e1a;
  --cosmos-dark: #0f1628;
  --nebula-blue: #1a2744;
  --stellar-cyan: #00d4ff;
  --axiom-purple: #a855f7;
  --energy-gold: #fbbf24;
  --starlight: #e2e8f0;
  --pure-white: #ffffff;
  --card-bg: #131b30;
  --card-border: #1e2d4d;
  --accent-green: #34d399;
  --text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--deep-space);
  color: var(--starlight);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--stellar-cyan); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--axiom-purple); }

/* --- Starfield Background --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(0,212,255,0.4), transparent),
    radial-gradient(1px 1px at 40% 40%, rgba(168,85,247,0.3), transparent);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* --- Header --- */
.ash-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  transition: box-shadow 0.3s;
}

.ash-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

.ash-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--pure-white);
  letter-spacing: -0.02em;
}

.ash-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--stellar-cyan), var(--axiom-purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--deep-space);
}

.ash-logo span { color: var(--stellar-cyan); }

/* --- Navigation --- */
.ash-nav { display: flex; align-items: center; gap: 0.25rem; }

.ash-nav a {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s;
}

.ash-nav a:hover, .ash-nav a.active {
  color: var(--pure-white);
  background: rgba(0, 212, 255, 0.1);
}

.ash-nav-cta {
  background: linear-gradient(135deg, var(--stellar-cyan), var(--axiom-purple)) !important;
  color: var(--deep-space) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.25rem !important;
}

.ash-nav-cta:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

/* Mobile menu */
.ash-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--starlight);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .ash-menu-toggle { display: block; }
  .ash-nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    border-bottom: 1px solid var(--card-border);
  }
  .ash-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .ash-nav a { width: 100%; text-align: center; padding: 0.75rem; }
}

/* --- Hero Section --- */
.ash-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.ash-hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, rgba(168,85,247,0.05) 40%, transparent 70%);
  pointer-events: none;
}

.ash-hero-content { max-width: 900px; position: relative; }

.ash-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--stellar-cyan);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ash-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.ash-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--stellar-cyan), var(--axiom-purple), var(--energy-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ash-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

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

.ash-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.ash-btn-primary {
  background: linear-gradient(135deg, var(--stellar-cyan), #0090cc);
  color: var(--deep-space);
}

.ash-btn-primary:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
  color: var(--deep-space);
}

.ash-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  color: var(--starlight);
}

.ash-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--stellar-cyan);
  transform: translateY(-2px);
  color: var(--pure-white);
}

/* --- Hero stats row --- */
.ash-hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ash-hero-stat { text-align: center; }

.ash-hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--stellar-cyan), var(--axiom-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ash-hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .ash-hero-stats { gap: 1.5rem; flex-wrap: wrap; }
}

/* --- Sections --- */
.ash-section {
  padding: 6rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.ash-section-wide {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.ash-section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--stellar-cyan);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.ash-section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

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

/* --- Cards Grid --- */
.ash-grid {
  display: grid;
  gap: 1.5rem;
}

.ash-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ash-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ash-grid-5 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.ash-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.ash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stellar-cyan), var(--axiom-purple));
  opacity: 0;
  transition: opacity 0.3s;
}

.ash-card:hover {
  border-color: rgba(0, 212, 255, 0.15);
}

/* Only cards that are links get the lift effect */
a.ash-card:hover, .ash-card-link:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

a.ash-card:hover::before, .ash-card-link:hover::before { opacity: 1; }

.ash-card-icon {
  width: 48px; height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.ash-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.ash-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Axiom card numbering */
.ash-axiom-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--stellar-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* --- Feature image blocks --- */
.ash-feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.ash-feature-block.reverse { direction: rtl; }
.ash-feature-block.reverse > * { direction: ltr; }

.ash-feature-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ash-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.ash-feature-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.ash-feature-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .ash-feature-block { grid-template-columns: 1fr; gap: 2rem; }
  .ash-feature-block.reverse { direction: ltr; }
}

/* --- Code / Formula blocks --- */
.ash-formula {
  background: var(--cosmos-dark);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--stellar-cyan);
  overflow-x: auto;
  margin: 1.5rem 0;
  text-align: center;
}

.ash-code-block {
  background: var(--cosmos-dark);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--starlight);
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* --- Divider --- */
.ash-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.ash-divider hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border), transparent);
}

/* --- CTA Section --- */
.ash-cta {
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
}

.ash-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ash-cta h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.ash-cta p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --- Footer --- */
.ash-footer {
  background: var(--cosmos-dark);
  border-top: 1px solid var(--card-border);
  padding: 3rem 2rem;
}

.ash-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.ash-footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.ash-footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pure-white);
  margin-bottom: 1rem;
}

.ash-footer-col ul {
  list-style: none;
  padding: 0;
}

.ash-footer-col li { margin-bottom: 0.5rem; }

.ash-footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.ash-footer-col a:hover { color: var(--stellar-cyan); }

.ash-footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .ash-footer-inner { grid-template-columns: 1fr 1fr; }
  .ash-footer-bottom { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .ash-footer-inner { grid-template-columns: 1fr; }
}

/* --- Math page styles --- */
.ash-math-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.ash-math-section h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ash-math-section p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Timeline --- */
.ash-timeline {
  position: relative;
  padding-left: 3rem;
}

.ash-timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--stellar-cyan), var(--axiom-purple), transparent);
}

.ash-timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}

.ash-timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.4rem;
  width: 12px; height: 12px;
  background: var(--stellar-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* --- Gallery grid --- */
.ash-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ash-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: all 0.3s;
}

.ash-gallery-item:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.ash-gallery-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.ash-gallery-caption {
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Page header banner --- */
.ash-page-header {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.ash-page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(0,212,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.ash-page-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.ash-page-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto;
}

/* --- Scroll animation --- */
.ash-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Utility --- */
.text-cyan { color: var(--stellar-cyan); }
.text-purple { color: var(--axiom-purple); }
.text-gold { color: var(--energy-gold); }
.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Responsive images in content --- */
.wp-block-image img { border-radius: 12px; }

/* --- WP Block overrides for dark theme --- */
.wp-block-separator {
  border-color: var(--card-border) !important;
  opacity: 1;
}

/* --- Full-width image banner --- */
.ash-banner-image {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.ash-banner-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

/* --- Detail list --- */
.ash-detail-list {
  list-style: none;
  padding: 0;
}

.ash-detail-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ash-detail-list li:last-child { border-bottom: none; }

.ash-detail-label {
  color: var(--stellar-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 2px;
}

.ash-detail-value {
  color: var(--starlight);
  flex: 1;
}

/* --- Two-column text --- */
.ash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .ash-two-col { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* --- Highlight box --- */
.ash-highlight {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(168,85,247,0.08));
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.ash-highlight h4 {
  color: var(--stellar-cyan);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* --- Stat row --- */
.ash-stat-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.ash-stat-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.ash-stat-box .value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--stellar-cyan);
  line-height: 1;
}

.ash-stat-box .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

/* --- Image with caption --- */
.ash-figure {
  margin: 2rem 0;
}

.ash-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.ash-figure figcaption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-style: italic;
}

/* --- Blockquote --- */
.ash-quote {
  border-left: 3px solid var(--stellar-cyan);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(0,212,255,0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--starlight);
}

/* --- Full width image section --- */
.ash-full-image {
  margin: 3rem 0;
  text-align: center;
}

.ash-full-image img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* --- Key-value table --- */
.ash-kv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.ash-kv-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}

.ash-kv-table td:first-child {
  color: var(--stellar-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  width: 180px;
}

/* --- Print --- */
@media print {
  body::before { display: none; }
  .ash-header, .ash-footer { display: none; }
  body { background: white; color: black; }
}
