:root {
  color-scheme: light;
  --ink: #000000;
  --muted: #666666;
  --accent: #ff6b35;
  --accent-2: #ffd93d;
  --accent-3: #4a90d9;
  --paper: #f5f5f5;
  --card: #ffffff;
  --line: #000000;
  --shadow: 6px 6px 0 #000000;
  --font-mono: "Space Mono", "Courier Prime", monospace;
  --font-display: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--ink);
  background-color: var(--paper);
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

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

.page {
  max-width: 960px;
  margin: 28px auto 60px;
  padding: 32px 28px 80px;
  background: var(--card);
  border: 3px solid var(--line);
  box-shadow: 12px 12px 0 var(--accent-2);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-bottom: 3px solid var(--line);
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 3px solid var(--line);
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}


.name {
  font-weight: 600;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav a {
  border: 2px solid var(--line);
  padding: 6px 10px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 0.7rem;
  border-bottom: none;
}

.nav a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.social {
  display: flex;
  gap: 10px;
  font-weight: 600;
}

.social a {
  color: var(--ink);
  padding: 6px 8px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--line);
  border-bottom: none;
}

.social a:hover {
  background: var(--accent-3);
}

.social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero {
  margin: 48px 0 40px;
  padding: 24px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero h1 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 12px;
}

.lede {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

.content {
  display: grid;
  gap: 36px;
}

.year-block {
  padding: 28px 32px;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.year-block h2 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  margin: 0 0 16px;
}

.year-block ol {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.year-block li {
  line-height: 1.5;
}

.year-block span {
  color: var(--ink);
  font-weight: 500;
}

.about {
  margin: 64px 0 40px;
}

.about-card {
  padding: 32px;
  border-radius: 12px;
  background: #fff;
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
}

.about-card h2 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  margin: 8px 0 16px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 18px;
}

.date {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.tags {
  margin-top: 48px;
}

.tags h2 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  margin: 0 0 16px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-grid span {
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--line);
}

.tag-grid span:nth-child(2n) {
  background: var(--accent-3);
}

.footer {
  margin-top: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 3px solid var(--line);
  padding-top: 16px;
}

.post-hero {
  margin: 48px 0 32px;
  padding: 24px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.post-hero h1 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 12px;
}

.post {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.8;
}

.post h2 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  margin: 32px 0 14px;
  color: var(--ink);
}

.post h3 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--ink);
}

.post p {
  margin: 0 0 18px;
  color: var(--muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  background: #fff;
  border: 2px solid var(--line);
  padding: 0 6px;
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--line);
}

.post ul {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--muted);
}

.post li {
  margin-bottom: 10px;
}

.post strong {
  color: var(--ink);
}

.table-wrap {
  margin: 22px 0 28px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  border: 2px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--accent-2);
  font-weight: 700;
  color: var(--ink);
}

.data-table td {
  color: var(--muted);
  line-height: 1.6;
}

.post-callout {
  padding: 24px 28px;
  margin: 28px 0;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.post-callout.disclaimer {
  background: var(--accent-2);
  border-left: 6px solid var(--accent);
}

.post-callout h3 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.equation-card {
  margin: 24px 0;
  padding: 18px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.equation-title {
  margin: 0 0 10px;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--ink);
}

.equation-line {
  margin: 0 0 10px;
}

.equation-line:last-child {
  margin-bottom: 0;
}

.equation-meta {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
}

.math {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
}

.math sub {
  font-size: 0.7em;
  vertical-align: baseline;
  position: relative;
  bottom: -0.25em;
}

.math-hat {
  position: relative;
  display: inline-block;
  padding: 0 2px;
}

.math-hat::after {
  content: "^";
  position: absolute;
  left: 50%;
  top: -0.65em;
  transform: translateX(-50%);
  font-size: 0.7em;
  color: var(--muted);
}

.diagram {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.diagram * {
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.stack-diagram {
  width: 100%;
  height: auto;
}

.stack-box {
  fill: #fff;
  stroke: var(--line);
  stroke-width: 1.5;
  rx: 10;
  ry: 10;
}

.stack-box.accent {
  fill: rgba(10, 102, 255, 0.08);
  stroke: rgba(10, 102, 255, 0.4);
}

.stack-label {
  font-size: 0.75rem;
  fill: var(--ink);
  text-anchor: middle;
}

.stack-arrow {
  stroke: var(--accent);
  stroke-width: 2;
}

.stack-arrow-head {
  fill: var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0 30px;
}

.metric-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.metric-card h3 {
  margin: 0 0 10px;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin: 0 0 6px;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  color: var(--ink);
}

.metric-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0 30px;
}

.plot-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.plot-card h3 {
  margin: 0 0 12px;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plot-chart {
  width: 100%;
  height: auto;
}

.plot-axis {
  stroke: var(--line);
  stroke-width: 2.5;
}

.plot-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.6s ease forwards;
}

.plot-line.alt {
  stroke: var(--accent-3);
  animation-delay: 0.2s;
}

.hist-bar {
  fill: var(--accent-2);
  stroke: var(--line);
  stroke-width: 2;
  animation: pop 1.2s ease forwards;
  transform-origin: bottom;
  transform: scaleY(0);
}

.hist-bar.emphasis {
  fill: var(--accent);
}

.window-box {
  fill: rgba(0, 194, 255, 0.2);
  stroke: var(--line);
  stroke-width: 2.5;
}

.window-slice {
  fill: rgba(255, 212, 0, 0.35);
  stroke: var(--line);
  stroke-width: 2;
}

.window-arrow {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  animation: sweep 2.6s ease-in-out infinite;
}

.cnn-block {
  fill: #fff;
  stroke: var(--line);
  stroke-width: 2;
  rx: 14;
  ry: 14;
}

.cnn-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.cnn-label {
  font-size: 0.75rem;
  fill: var(--muted);
}

.flow-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  animation: draw 1.6s ease forwards;
}

.flow-dash {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 8 10;
  opacity: 0.6;
  animation: drift 7s linear infinite;
}

.flow-dot {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 2;
}

.flow-arrow {
  fill: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
  transform-origin: center;
}

.regime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.regime-card {
  padding: 20px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.regime-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--accent-3);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}

.chip.negative {
  border-color: var(--line);
  background: var(--accent-2);
  color: var(--ink);
}

.regime-icon {
  width: 100%;
  height: 120px;
  margin: 10px 0 4px;
}

.regime-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw 1.4s ease forwards;
}

.regime-line.positive {
  stroke: var(--accent);
}

.regime-line.negative {
  stroke: #d64b2a;
}

.regime-base {
  stroke: var(--line);
  stroke-width: 2;
}

.charm-dot {
  fill: rgba(10, 102, 255, 0.14);
  stroke: var(--accent);
  stroke-width: 2;
  animation: pulse 3s ease-in-out infinite;
}

.charm-line {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.level-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.level-dot {
  fill: var(--accent);
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 18px 0 30px;
}

.setup-card {
  padding: 20px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.setup-card h3 {
  margin-top: 0;
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.setup-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 18px 0 30px;
}

.process-card {
  padding: 20px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.process-step {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.process-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.callout-note {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-title {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  margin: 32px 0 14px;
  color: var(--ink);
}

.sources {
  margin: 32px 0 24px;
  padding: 20px 24px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.sources h3 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.sources ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.sources li {
  margin-bottom: 8px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 28px;
}

.info-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
}

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

.post-figure {
  margin: 24px 0 20px;
  padding: 20px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.post-figure figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.axis {
  stroke: var(--line);
  stroke-width: 2.5;
}

.axis-label {
  font-size: 0.75rem;
  fill: var(--muted);
}

.tick-label {
  font-size: 0.55rem;
  fill: var(--ink);
}

.range-box {
  fill: rgba(255, 212, 0, 0.25);
  stroke: var(--line);
  stroke-width: 2.5;
}

.condor-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: draw 1.8s ease forwards;
}

.price-wave {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
  opacity: 0.7;
  animation: drift 6s linear infinite;
}

.breakout-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: draw 2s ease forwards;
}

.step-list {
  margin: 0 0 28px;
  padding-left: 24px;
  color: var(--muted);
}

.step-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.ladder {
  margin: 24px 0 26px;
  padding: 20px 22px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.ladder-row {
  display: grid;
  grid-template-columns: 80px 1fr 90px 80px;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.ladder-label {
  font-weight: 600;
  color: var(--ink);
}

.ladder-detail {
  font-weight: 600;
  color: var(--ink);
}

.ladder-bar {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d6e3ff 0%, var(--accent) 100%);
  position: relative;
  overflow: hidden;
  justify-self: start;
}

.ladder-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  animation: sweep 2.8s ease-in-out infinite;
}

.bar-1 {
  width: 35%;
}

.bar-2 {
  width: 55%;
}

.bar-3 {
  width: 75%;
}

.bar-4 {
  width: 95%;
  background: linear-gradient(90deg, #f6b29c 0%, #d64b2a 100%);
  --pulse-color: rgba(214, 75, 42, 0.35);
  animation: pulse 2.4s ease-in-out infinite;
}

.bar-4::after {
  animation-duration: 1.8s;
}

.timeline {
  margin: 24px 0 28px;
  padding-left: 18px;
  border-left: 3px solid var(--line);
  display: grid;
  gap: 18px;
}

.timeline-item {
  position: relative;
  padding-left: 16px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--line);
}

.timeline-item:last-child::before {
  --pulse-color: rgba(10, 102, 255, 0.3);
  animation: pulse 2.6s ease-in-out infinite;
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.time {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink);
}

.post-disclaimer {
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 3px solid var(--line);
  padding-top: 18px;
}

.hero h1,
.year-block h2,
.about-card h2,
.tags h2,
.post-hero h1,
.post h2,
.post h3,
.post-callout h3,
.equation-title,
.metric-card h3,
.metric-value,
.plot-card h3,
.sources h3,
.info-card h3,
.timeline-title {
  font-family: var(--font-display);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drift {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -120;
  }
}

@keyframes sweep {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(260%);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--pulse-color, rgba(214, 75, 42, 0.3));
  }
  60% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(0, 0, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

@keyframes pop {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (max-width: 720px) {
  .page {
    margin: 16px;
    box-shadow: 6px 6px 0 var(--accent-2);
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    order: 3;
    flex-wrap: wrap;
  }

  .hero {
    margin-top: 40px;
  }

  .year-block {
    padding: 24px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .regime-grid,
  .setup-grid,
  .metric-grid,
  .plot-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .ladder-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ladder-bar {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
