/* Runta Blog Theme - Cyberpunk Dark Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* ── CSS Variables ── */
:root {
  --background: hsl(0 0% 0%);
  --background-card: hsl(240 20% 6%);
  --foreground: hsl(210 40% 98%);
  --foreground-muted: hsl(215 20% 55%);
  --primary: hsl(25 95% 55%);
  --primary-hover: hsl(35 100% 60%);
  --secondary: hsl(35 100% 60%);
  --border: hsl(240 15% 20%);
  --glow-primary: 25 95% 55%;
  --glow-secondary: 35 100% 60%;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 6px;
}

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

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

body {
  background-color: var(--background);
  color: hsl(210 40% 98%);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

/* ── Background Effects ── */
.bg-effects {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-ambient {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, hsl(0 0% 100% / 0.08), transparent 60%);
}

/* ── Layout ── */
.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container-wide {
  max-width: calc(80rem + 3rem);
}

/* ── Header / Nav ── */
.site-header {
  position: relative;
  z-index: 50;
  color: hsl(210 40% 98%);
}

/* ── Main Content ── */
.site-main {
  flex: 1;
  padding: 3rem 0;
}

/* ── Hero (Home Page) ── */
.home-hero {
  text-align: left;
  padding: 4rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-hero-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.75rem;
  animation: float 6s ease-in-out infinite;
}

.home-hero-logo-glow {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--glow-primary) / 0.5) 0%, transparent 70%);
  filter: blur(20px);
  animation: pulse-glow 3s ease-in-out infinite;
}

.home-hero-logo {
  position: relative;
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px hsl(var(--glow-primary) / 0.6));
  animation: fade-in-up 0.5s ease both;
}

@media (min-width: 768px) {
  .home-hero-logo {
    width: 160px;
    height: 160px;
  }
}

.home-hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(135deg, hsl(var(--glow-primary)), hsl(var(--glow-secondary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px hsl(var(--glow-primary) / 0.4));
  margin-bottom: 1rem;
  animation: fade-in-up 0.6s ease both;
}

.home-hero-subtitle {
  font-size: 1rem;
  color: var(--foreground-muted);
  letter-spacing: 0.05em;
  max-width: 40ch;
  margin: 0;
  animation: fade-in-up 0.6s 0.2s ease both;
}

/* ── Post List ── */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 780px;
  margin: 0 auto;
}

.post-list-item {
  border-bottom: 1px solid var(--border);
  animation: fade-in-up 0.5s ease both;
}

.post-list-item:first-child {
  border-top: 1px solid var(--border);
}

.post-list-link {
  display: block;
  padding: 1.5rem 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.post-list-link:hover .post-list-title {
  color: var(--primary);
}

.post-list-meta {
  font-size: 0.7rem;
  color: var(--foreground-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-list-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  transition: color 0.2s ease;
  margin-bottom: 0.5rem;
}

.post-list-summary {
  font-size: 0.85rem;
  color: var(--foreground-muted);
  line-height: 1.6;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.post-tag {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--glow-primary) / 0.8);
  border: 1px solid hsl(var(--glow-primary) / 0.3);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  background: hsl(var(--glow-primary) / 0.05);
}

/* ── Single Post ── */
.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--foreground);
  margin-bottom: 1rem;
  animation: fade-in-up 0.5s ease both;
}

.post-meta {
  font-size: 0.72rem;
  color: var(--foreground-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  animation: fade-in-up 0.5s 0.1s ease both;
}

.post-meta-sep {
  color: var(--border);
}

/* ── Article Content ── */
.post-content {
  animation: fade-in-up 0.5s 0.2s ease both;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-content h2 {
  font-size: 1.4rem;
  color: hsl(var(--glow-primary));
}

.post-content h3 {
  font-size: 1.1rem;
  color: var(--foreground);
}

.post-content p {
  margin-bottom: 1.25rem;
  color: hsl(210, 30%, 85%);
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--secondary);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: hsl(var(--glow-secondary));
}

.post-content pre {
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  position: relative;
}

.post-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--glow-primary) / 0.5), transparent);
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--foreground);
}

.post-content blockquote {
  border-left: 2px solid hsl(var(--glow-primary) / 0.5);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--foreground-muted);
  font-style: italic;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.4rem;
  color: hsl(210, 30%, 85%);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-content img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Thesis Diagrams ── */
.thesis-wide {
  width: min(calc(100vw - 2rem), 1100px);
  margin: 2.5rem 0;
  margin-left: 50%;
  transform: translateX(-50%);
}

.thesis-problem-grid,
.thesis-boundary-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.thesis-card,
.thesis-panel,
.thesis-execution-shell,
.thesis-compare,
.thesis-proof-strip {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in hsl, var(--background-card) 86%, transparent);
  box-shadow: 0 18px 70px -52px hsl(0 0% 0% / 0.95);
}

.thesis-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thesis-card:hover {
  border-color: hsl(var(--glow-primary) / 0.5);
  box-shadow: 0 0 50px -26px hsl(var(--glow-primary) / 0.75);
}

.post-content .thesis-card h3 {
  margin: 0.35rem 0 0.8rem;
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.25;
}

.post-content .thesis-card p,
.post-content .thesis-record p {
  color: var(--foreground-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  margin-bottom: 0.65rem;
}

.thesis-card-kicker,
.thesis-panel-title,
.thesis-flow-label,
.thesis-callout span,
.thesis-warning,
.thesis-record > span,
.thesis-banner,
.thesis-compare span,
.thesis-proof-strip strong {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.thesis-card-kicker {
  color: var(--foreground-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.thesis-callout {
  margin-top: auto;
  border: 1px solid hsl(var(--glow-primary) / 0.25);
  border-radius: 10px;
  background: hsl(var(--glow-primary) / 0.045);
  color: var(--foreground-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  padding: 0.65rem 0.75rem;
}

.thesis-callout span {
  color: var(--primary);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.thesis-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  justify-content: flex-start;
  margin-top: 1rem;
  text-align: left;
  border: 1px solid hsl(var(--glow-primary) / 0.3);
  border-radius: 16px;
  background: hsl(var(--glow-primary) / 0.045);
  color: var(--foreground);
  font-size: 0.86rem;
  padding: 1rem 1.25rem;
}

.thesis-banner span:last-child {
  color: var(--primary);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.thesis-panel {
  padding: 1.25rem;
}

.thesis-panel-accent {
  border-color: hsl(var(--glow-primary) / 0.6);
  background: hsl(var(--glow-primary) / 0.045);
  box-shadow: 0 0 80px -30px hsl(var(--glow-primary) / 0.75);
}

.thesis-panel-title,
.thesis-flow-label {
  color: var(--foreground-muted);
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
}

.thesis-agent-box,
.thesis-record {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: hsl(240 20% 3% / 0.45);
  color: var(--foreground);
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.thesis-agent-accent,
.thesis-record {
  border-color: hsl(var(--glow-primary) / 0.45);
}

.thesis-agent-box span {
  display: block;
  color: var(--foreground-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.thesis-fragment-grid,
.thesis-event-grid,
.thesis-outcome-grid {
  display: grid;
  gap: 0.5rem;
}

.thesis-fragment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.thesis-fragment-grid div,
.thesis-event-grid div,
.thesis-outcome-grid div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: hsl(240 20% 3% / 0.35);
  min-width: 0;
  padding: 0.7rem;
  text-align: center;
}

.thesis-fragment-grid strong,
.thesis-outcome-grid strong {
  display: block;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.thesis-fragment-grid span,
.thesis-outcome-grid span {
  display: block;
  color: var(--foreground-muted);
  font-size: 0.68rem;
  line-height: 1.25;
  margin-top: 0.3rem;
}

.post-content .thesis-panel-note {
  color: var(--foreground-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  margin: 1rem 0 0;
  text-align: center;
  text-transform: uppercase;
}

.thesis-warning {
  border: 1px solid hsl(0 72% 55% / 0.38);
  border-radius: 8px;
  background: hsl(0 72% 55% / 0.06);
  color: hsl(0 82% 70%);
  font-size: 0.68rem;
  margin-top: 1rem;
  padding: 0.75rem;
  text-align: center;
  text-transform: uppercase;
}

.thesis-down-arrow {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin: 0.75rem 0;
  text-align: center;
}

.thesis-record {
  background: hsl(var(--glow-primary) / 0.06);
  box-shadow: 0 0 48px -28px hsl(var(--glow-primary) / 0.8);
  margin-top: 0;
}

.thesis-record strong {
  display: block;
  color: var(--foreground);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.thesis-record > span {
  color: var(--primary);
  display: block;
  font-size: 0.68rem;
  margin-top: 0.5rem;
}

.thesis-event-grid {
  border-top: 1px solid hsl(var(--glow-primary) / 0.2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  padding-top: 1rem;
}

.thesis-event-grid div {
  border-color: transparent;
  background: hsl(var(--glow-primary) / 0.055);
  color: var(--foreground-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.2;
  padding: 0.55rem 0.35rem;
}

.thesis-accent-label {
  color: var(--primary);
  margin: 1rem 0;
}

.thesis-outcome-grid {
  grid-template-columns: 1fr;
}

.thesis-outcome-grid div {
  border-color: hsl(var(--glow-primary) / 0.35);
  background: hsl(240 20% 3% / 0.4);
  text-align: left;
}

.thesis-outcome-grid strong {
  color: var(--primary);
}

.thesis-execution-layer {
  max-width: 860px;
}

.thesis-execution-shell {
  overflow: hidden;
  position: relative;
  border-color: hsl(var(--glow-primary) / 0.32);
  background:
    radial-gradient(circle at 44% 0%, hsl(var(--glow-primary) / 0.2), transparent 36%),
    radial-gradient(circle at 88% 80%, hsl(var(--glow-primary) / 0.12), transparent 34%),
    hsl(240 20% 3% / 0.92);
  box-shadow: 0 0 90px -38px hsl(var(--glow-primary) / 0.9);
  padding: 1rem;
}

.thesis-execution-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--glow-primary) / 0.7), transparent);
}

.thesis-execution-topline,
.thesis-execution-brand span,
.thesis-execution-layer-copy > span,
.thesis-execution-layer-copy > strong,
.thesis-execution-targets {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.thesis-execution-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--primary);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.thesis-execution-agent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  border: 1px solid hsl(210 40% 98% / 0.1);
  border-radius: 12px;
  background: hsl(210 40% 98% / 0.028);
  box-shadow: inset 0 1px 0 hsl(210 40% 98% / 0.06);
  padding: 0.85rem;
}

.thesis-execution-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid hsl(var(--glow-primary) / 0.35);
  border-radius: 10px;
  background: hsl(0 0% 0% / 0.45);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  box-shadow: 0 0 24px -14px hsl(var(--glow-primary) / 0.95);
}

.thesis-execution-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.thesis-execution-agent strong {
  color: var(--foreground);
  font-size: 1.05rem;
}

.thesis-execution-boundary {
  position: relative;
  margin-top: 0.75rem;
  border: 1px dashed hsl(var(--glow-primary) / 0.55);
  border-radius: 16px;
  background: hsl(var(--glow-primary) / 0.055);
  box-shadow:
    inset 0 0 58px -24px hsl(var(--glow-primary) / 0.9),
    0 0 54px -32px hsl(var(--glow-primary) / 0.95);
  padding: 0.85rem;
}

.thesis-execution-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.thesis-execution-brand img {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 0;
  flex-shrink: 0;
  margin: 0;
  object-fit: contain;
}

.thesis-execution-brand strong {
  display: block;
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1;
}

.thesis-execution-brand span {
  display: block;
  color: hsl(var(--glow-primary) / 0.86);
  font-size: 0.7rem;
  margin-top: 0.3rem;
}

.thesis-execution-layers {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
  border: 1px solid hsl(var(--glow-primary) / 0.25);
  border-radius: 12px;
  background:
    radial-gradient(circle at 40% 24%, hsl(var(--glow-primary) / 0.16), transparent 30%),
    hsl(0 0% 0% / 0.35);
  padding: 0.8rem;
}

.thesis-execution-layers > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--glow-primary) / 0.42);
  border-radius: 12px;
  background: hsl(var(--glow-primary) / 0.055);
  box-shadow:
    0 0 34px -24px hsl(var(--glow-primary) / 0.85),
    inset 0 1px 0 hsl(var(--glow-primary) / 0.18);
  padding: 0.8rem 0.9rem;
}

.thesis-execution-layers > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, hsl(var(--glow-primary) / 0.08), transparent 68%);
  pointer-events: none;
}

.thesis-execution-layer-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid hsl(var(--glow-primary) / 0.35);
  border-radius: 10px;
  background: hsl(0 0% 0% / 0.45);
  color: var(--primary);
  box-shadow: 0 0 24px -14px hsl(var(--glow-primary) / 0.95);
}

.thesis-execution-layer-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.thesis-execution-layer-copy,
.thesis-execution-layer-copy > span,
.thesis-execution-layer-copy > strong {
  position: relative;
  display: block;
}

.thesis-execution-layer-copy > span {
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 700;
}

.thesis-execution-layer-copy > strong {
  color: var(--foreground-muted);
  font-size: 0.68rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.thesis-execution-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 3rem;
  align-items: stretch;
  padding: 0 0.6rem;
}

.thesis-execution-flow span {
  position: relative;
  overflow: hidden;
  justify-self: center;
  width: 1px;
  background: linear-gradient(to bottom, hsl(var(--glow-primary) / 0.28), transparent);
  box-shadow: 0 0 14px hsl(var(--glow-primary) / 0.35);
}

.thesis-execution-flow span::after {
  content: "";
  position: absolute;
  inset: -70% 0 auto;
  height: 70%;
  background: linear-gradient(to bottom, transparent, hsl(var(--glow-primary) / 0.95), transparent);
  filter: drop-shadow(0 0 8px hsl(var(--glow-primary) / 0.8));
  animation: thesis-execution-current 1.25s linear infinite;
}

.thesis-execution-flow span:nth-child(2)::after {
  animation-delay: 120ms;
}

.thesis-execution-flow span:nth-child(3)::after {
  animation-delay: 240ms;
}

.thesis-execution-flow span:nth-child(4)::after {
  animation-delay: 360ms;
}

.thesis-execution-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.64rem;
  text-align: center;
}

.thesis-execution-targets div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  margin: 0;
  border: 1px solid hsl(var(--glow-primary) / 0.25);
  border-radius: 12px;
  background: #020403;
  box-shadow: 0 0 26px -18px hsl(var(--glow-primary) / 0.9);
  padding: 0.75rem 0.45rem;
  line-height: 1;
}

.thesis-compare {
  margin: 2.5rem auto;
  max-width: 820px;
  overflow: hidden;
}

.thesis-compare-header,
.thesis-compare-row,
.thesis-compare-foot {
  display: grid;
  grid-template-columns: 1fr;
}

.thesis-compare-header > div,
.thesis-compare-row > div,
.thesis-compare-foot > div {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
}

.thesis-compare-header {
  color: var(--foreground-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.thesis-compare-header span,
.thesis-compare-row span,
.thesis-compare-foot {
  color: var(--foreground-muted);
  display: block;
  font-size: 0.68rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.thesis-compare-row > div:first-child {
  background: hsl(210 40% 98% / 0.025);
  color: var(--foreground-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.thesis-compare-row strong {
  color: var(--foreground);
}

.thesis-compare-header > div:nth-child(3),
.thesis-compare-row > div:nth-child(3),
.thesis-compare-foot > div:nth-child(3) {
  background: hsl(var(--glow-primary) / 0.035);
}

.thesis-compare-row > div:nth-child(2) span {
  color: hsl(0 82% 70% / 0.82);
}

.thesis-proof-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2.5rem auto 0;
  max-width: 820px;
  padding: 1rem 1.25rem;
}

.thesis-proof-strip strong,
.thesis-proof-strip span {
  display: block;
}

.thesis-proof-strip strong {
  color: var(--foreground);
  font-size: 0.78rem;
}

.thesis-proof-strip span {
  color: var(--foreground-muted);
  font-size: 0.86rem;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .thesis-banner {
    align-items: flex-start;
    flex-direction: row;
    gap: 1rem;
  }

  .thesis-fragment-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .thesis-event-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .thesis-outcome-grid,
  .thesis-proof-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .thesis-compare-header,
  .thesis-compare-row,
  .thesis-compare-foot {
    grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  }

  .thesis-compare-header > div + div,
  .thesis-compare-row > div + div,
  .thesis-compare-foot > div + div {
    border-left: 1px solid var(--border);
  }

  .thesis-execution-targets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .thesis-problem-grid,
  .thesis-boundary-diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Section Heading ── */
.section-heading {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--foreground-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Badge ── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--glow-primary) / 0.8);
  border: 1px solid hsl(var(--glow-primary) / 0.3);
  border-radius: 100px;
  padding: 0.2rem 0.75rem;
  background: hsl(var(--glow-primary) / 0.05);
  backdrop-filter: blur(4px);
}

/* ── Footer ── */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: grid;
  gap: 2.5rem;
  max-width: 80rem;
  padding: 0 1.5rem;
}

.site-footer-intro {
  min-width: 0;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.site-footer-brand-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.9;
  flex-shrink: 0;
}

.site-footer-description {
  color: var(--foreground-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 24rem;
}

.site-footer-copy {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--foreground-muted);
}

.site-footer-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.site-footer-title {
  color: var(--primary);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.site-footer-links a {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

@media (min-width: 640px) {
  .site-footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .site-footer {
    padding: 4rem 0;
  }

  .site-footer .container {
    grid-template-columns: 1.15fr 2fr;
    padding: 0 2.5rem;
  }

  .site-footer-brand {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-footer-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.pagination a,
.pagination span {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--foreground-muted);
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: hsl(var(--glow-primary) / 0.5);
  color: var(--primary);
}

.pagination .current {
  border-color: hsl(var(--glow-primary) / 0.5);
  color: var(--primary);
  background: hsl(var(--glow-primary) / 0.05);
}

/* ── Tags Page ── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tag-cloud a {
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--glow-primary) / 0.8);
  border: 1px solid hsl(var(--glow-primary) / 0.25);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  background: hsl(var(--glow-primary) / 0.04);
  transition: all 0.2s;
}

.tag-cloud a:hover {
  border-color: hsl(var(--glow-primary) / 0.6);
  background: hsl(var(--glow-primary) / 0.1);
  color: var(--primary);
}

/* ── Back Link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--foreground-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

.back-link::before {
  content: '←';
}

/* ── Animations ── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

@keyframes thesis-execution-current {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
  to {
    transform: translateY(260%);
    opacity: 0;
  }
}

/* ── Selection ── */
::selection {
  background: hsl(var(--glow-primary) / 0.25);
  color: var(--foreground);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-header .container {
    flex-direction: row;
    align-items: center;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}
