/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #fff;
  --bg-alt: #f8f9fa;
  --border-color: #e0e0e0;
  --code-bg: #f4f4f4;
  --success-color: #27ae60;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-color);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
  background: var(--code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
  border: 1px solid var(--border-color);
}

pre code {
  background: none;
  padding: 0;
}

/* Header */
header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg-color) 95%, transparent);
  border-bottom: 1px solid var(--border-color);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  image-rendering: pixelated;
    max-width: 360px;
    width: 100%;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.15));
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--primary-color);
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 7rem 0 6rem;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(52, 152, 219, 0.06),
    transparent 70%
  );
}

body.dark .hero {
  background: radial-gradient(
    circle at top,
    rgba(52, 152, 219, 0.12),
    transparent 60%
  );
}

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

/* Main statement */
.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.hero-title .muted {
  opacity: 0.75;
  font-weight: 600;
}

/* Lead paragraph */
.hero-lead {
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 auto 1.5rem;
  color: var(--text-color);
}

/* Supporting paragraph */
.hero-sub {
  font-size: 1.05rem;
  max-width: 780px;
  margin: 0 auto 2.5rem;
  color: var(--text-light);
}

/* CTA */
.hero .cta {
  margin-top: 2.8rem;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

.hero .btn {
  padding: 0.9rem 2.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero .btn.primary {
  background: var(--secondary-color);
  color: white;
}

.hero .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(52, 152, 219, 0.25);
}

.hero .btn.secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.hero .btn.secondary:hover {
  background: rgba(52, 152, 219, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-lead {
    font-size: 1.1rem;
  }

  .hero-sub {
    font-size: 1rem;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

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

.section h2 {
  margin-top: 0;
  margin-bottom: 2rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Features */
.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.features li {
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.section.alt .features li {
  background: white;
}

/* Principles */
.principle {
  margin-bottom: 2.5rem;
}

.principle h3 {
  color: var(--secondary-color);
  margin-bottom: 0.8rem;
}

.principle ul {
  margin-left: 1.5rem;
}

.principle li {
  margin-bottom: 0.5rem;
}

/* Architecture Diagram */
.architecture-visual {
  text-align: center;
}

.architecture-visual .subtitle {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  color: var(--text-light);
}

.diagram-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
}

.architecture-image {
  max-width: 100%;
  width: 900px;
  height: auto;
  border-radius: 12px;
  image-rendering: auto;
  background: transparent;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

/* Caption / Legend */
.architecture-caption {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  background: var(--bg-alt);
  padding: 1.5rem 2rem;
  border-radius: 10px;
  border-left: 4px solid var(--secondary-color);
}

.architecture-caption ul {
  margin-left: 1.2rem;
}

.architecture-caption li {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

/* Hosts Grid */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.host-card {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.host-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.host-card h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.host-card p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.shared-features {
  margin-top: 3rem;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--success-color);
}

.shared-features ul {
  margin-left: 1.5rem;
}

/* Code Blocks */
.code-block {
  font-size: 0.9rem;
}

/* Demo Sections */
.demo-section {
  margin-bottom: 3rem;
}

.demo-section h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Guardrails */
.guardrails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.guardrail-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
}

.guardrail-card h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.guardrail-card ul {
  margin-left: 1.5rem;
}

.guardrail-card li {
  margin-bottom: 0.5rem;
}

.emphasis {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 2rem;
  text-align: center;
}

/* Skills Section */
.skills-comparison {
  margin: 2rem 0;
}

.comparison-table {
  overflow-x: auto;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

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

.comparison-table tr:hover td {
  background: rgba(52, 152, 219, 0.05);
}

.skill-card {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin: 2rem 0;
}

.skill-card h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.skill-card h4 {
  color: var(--primary-color);
  margin: 1.5rem 0 0.8rem;
  font-size: 1.1rem;
}

.skill-targets ul,
.skill-guardrails ul {
  margin-left: 1.5rem;
}

.skill-targets li,
.skill-guardrails li {
  margin-bottom: 0.5rem;
}

.skill-example pre {
  margin: 1rem 0;
}

/* Roadmap */
.roadmap-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.roadmap-item {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: 8px;
  border-top: 4px solid var(--secondary-color);
}

.roadmap-item h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.roadmap-item ul {
  margin-left: 1.5rem;
}

.roadmap-item li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 1.2rem;
  }

  .intro {
    font-size: 1rem;
  }

  .cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .hosts-grid,
  .guardrails-grid,
  .roadmap-timeline {
    grid-template-columns: 1fr;
  }

  pre {
    font-size: 0.85rem;
    padding: 1rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--secondary-color);
  color: white;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #e0e0e0;
    --secondary-color: #f97316; /* Rust-ish accent */
    --accent-color: #fb7185;

    --text-color: #e5e7eb;
    --text-light: #9ca3af;

    --bg-color: #0f172a;        /* Deep slate */
    --bg-alt: #020617;         /* Near-black */
    --border-color: #1e293b;
    --code-bg: #020617;

    --success-color: #22c55e;
  }

  body {
    background: var(--bg-color);
    color: var(--text-color);
  }

  .architecture-image {
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.6));
  }

  .architecture-caption {
    background: #1a1f24;
    border-left-color: var(--secondary-color);
  }

  .comparison-table table {
    background: var(--bg-alt);
  }

  .comparison-table th {
    background: #1e293b;
  }

  .comparison-table tr:hover td {
    background: rgba(249, 115, 22, 0.08);
  }

  .skill-card {
    background: var(--bg-alt);
    border-color: var(--border-color);
  }
}