:root {
  --bg: #09090b;
  --bg-raised: #131316;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #a1a1aa;
  --border: #27272a;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}

nav .nav-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

nav .nav-logo svg {
  width: 24px;
  height: 24px;
}

nav .nav-links {
  display: flex;
  gap: 8px;
}

nav .nav-links a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border: 1px solid transparent;
}

nav .nav-links a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-raised);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
}

.logo {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.logo svg {
  width: 80px;
  height: 80px;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeIn 1s ease 0.2s forwards;
}

.hero h1 i {
  font-style: italic;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: -0.03em;
}

.hero .tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  max-width: 500px;
  font-style: italic;
  opacity: 0;
  animation: fadeIn 1s ease 0.4s forwards;
}

.hero .definition {
  margin-top: 32px;
  padding: 20px 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  max-width: 600px;
  text-align: left;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.hero .definition p {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.hero .definition strong {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hero .definition em {
  font-style: italic;
  color: var(--accent);
}

.hero .definition cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-style: normal;
  color: var(--text-muted);
}

.hero .definition cite a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

.hero .definition cite a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards, float 3s ease-in-out infinite 1.8s;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* Sections */
section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* Evidence Cards */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.evidence-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 32px;
  transition: all 0.3s ease;
  text-decoration: none; /* For clickable links */
  display: flex;
  flex-direction: column;
}

.evidence-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.evidence-card .source {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.evidence-card p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.evidence-card .stat-wrapper {
  display: block;
  margin-bottom: 0;
}

.evidence-card .stat {
  font-family: var(--mono);
  font-size: 3rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1;
  float: left;
  width: 90px;
  margin-right: 12px;
  margin-bottom: 0;
  shape-outside: margin-box;
}

.evidence-card .stat-wrapper p {
  margin: 0;
  padding-left: 0;
  text-align: left;
}

.closing-line {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
}

/* Distinction */
.distinction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 700px) {
  .distinction-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .viz-container {
    padding: 16px;
  }
  
  .path-viz {
    height: 200px;
  }
}

.distinction-col h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.distinction-col p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 12px;
}

.distinction-col .example {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  padding: 16px;
  background: var(--bg-raised);
  border-left: 2px solid var(--border);
  margin-top: 16px;
  line-height: 1.6;
}

.key-insight {
  margin: 48px auto 0;
  padding: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-style: italic;
  color: var(--text);
  font-size: 1.5rem;
  max-width: 800px;
  text-align: center;
  position: relative;
}

.key-insight::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.5;
  line-height: 0.5;
  vertical-align: top;
  margin-right: 8px;
}

/* Cartoon */
.cartoon {
  margin: 48px auto;
  text-align: center;
}

.cartoon img {
  max-width: 360px;
  width: 100%;
  border-radius: 4px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.cartoon img:hover {
  opacity: 1;
}

/* Math example styling */
.example-math {
  margin-top: 12px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* Prompt Comparison */
.prompt-comparison {
  margin-top: 64px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.prompt-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.prompt-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 3px;
}

.prompt-header code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
}

.response-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 800px) {
  .response-grid {
    grid-template-columns: 1fr;
  }
}

.response-col {
  padding: 24px;
}

.response-bad {
  border-right: 1px solid var(--border);
  background: rgba(239, 68, 68, 0.03);
}

.response-good {
  background: rgba(34, 197, 94, 0.03);
}

@media (max-width: 800px) {
  .response-bad {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.response-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.response-bad .response-label {
  color: #ef4444;
}

.response-good .response-label {
  color: #22c55e;
}

.response-content {
  font-size: 14px;
  line-height: 1.6;
}

.response-content p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.response-content ul {
  list-style: none;
  margin-bottom: 16px;
}

.response-content li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.response-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.response-content code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

.response-content .result {
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 0;
}

.response-bad .result {
  color: #ef4444;
}

.response-good .result {
  color: #22c55e;
}

.response-verdict {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  font-style: italic;
}

.response-bad .response-verdict {
  color: #ef4444;
}

.response-good .response-verdict {
  color: #22c55e;
}

/* Prompt insight line */
.prompt-insight {
  font-style: italic;
  color: var(--text);
  font-size: 1.5rem;
  text-align: center;
  margin-top: 32px;
  padding: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  position: relative;
}

.prompt-insight::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.5;
  line-height: 0.5;
  vertical-align: top;
  margin-right: 8px;
}

/* Solution */
.solution-container {
  display: flex;
  justify-content: center;
}

/* Probability Paths Visualization */
.viz-container {
  max-width: 700px;
  margin: 0 auto 48px;
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.path-viz {
  width: 100%;
  height: auto;
}

.viz-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 0;
}

/* Path animations */
.agent-path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawPath 4s ease-in-out infinite;
}

.path-a {
  animation-delay: 0s;
}

.path-b {
  animation-delay: 2s;
}

@keyframes drawPath {
  0% {
    stroke-dashoffset: 800;
    opacity: 0.3;
  }
  50% {
    stroke-dashoffset: 0;
    opacity: 0.8;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.3;
  }
}

/* Coverage regions fade in */
.coverage {
  animation: coveragePulse 4s ease-in-out infinite;
}

.coverage-a {
  animation-delay: 0.5s;
}

.coverage-b {
  animation-delay: 2.5s;
}

@keyframes coveragePulse {
  0%, 100% {
    opacity: 0;
  }
  30%, 70% {
    opacity: 0.08;
  }
}

/* Blind spot pulse */
.blind-spot {
  animation: blindSpotPulse 3s ease-in-out infinite;
  animation-delay: 1s;
}

.blind-label {
  animation: blindLabelFade 3s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes blindSpotPulse {
  0%, 100% {
    opacity: 0;
    r: 8;
  }
  50% {
    opacity: 0.6;
    r: 14;
  }
}

@keyframes blindLabelFade {
  0%, 100% {
    opacity: 0;
  }
  40%, 60% {
    opacity: 0.8;
  }
}

/* Human node pulse */
.human-node circle {
  animation: humanPulse 4s ease-in-out infinite;
}

@keyframes humanPulse {
  0%, 100% {
    stroke-width: 2;
  }
  50% {
    stroke-width: 3;
  }
}

/* Explore link */
.explore-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.explore-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.solution-content {
  max-width: 700px;
  text-align: left;
}

.solution-content p {
  margin-bottom: 24px;
  color: var(--text-muted);
}

.solution-content p:first-of-type {
  color: var(--text);
  font-size: 1.15rem;
}

.math-block {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 24px;
  margin: 32px 0;
}

.math-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 600px) {
  .math-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.math-col {
  padding: 16px;
  border-left: 2px solid var(--border);
}

.math-label {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.math-line {
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.math-line.muted {
  opacity: 0.7;
}

.math-line.result {
  color: var(--text);
  font-weight: 500;
  font-size: 16px;
}

.math-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  opacity: 0.7;
}

.math-footnote {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  opacity: 0.6;
}

.math-block .result {
  color: var(--text);
  font-weight: 500;
}

.human-note {
  font-style: italic;
  color: var(--text);
  font-size: 1.5rem;
  text-align: center;
  margin-top: 32px;
  padding: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  position: relative;
}

.human-note::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.5;
  line-height: 0.5;
  vertical-align: top;
  margin-right: 8px;
}

/* Footer */
footer {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-btn {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 16px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  border-color: var(--text);
  background: var(--bg-raised);
}

.footer-links {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.copyright {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Resource Page Specific */
main.resource-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 160px 24px 120px;
}

.resource-section {
  margin-bottom: 64px;
}

.resource-section h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.resource-list {
  list-style: none;
}

.resource-list li {
  margin-bottom: 24px;
}

.resource-list a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.resource-list a:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.resource-list .title {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-list .desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.resource-list .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}
