/* ============================================================
   bigcompute.science — Dark Academic Mathematical Journal

   Design philosophy: dark background, but structured like a
   mathematics journal. Theorem/proof/lemma environments,
   numbered definitions, serif body text, proper mathematical
   typesetting conventions. When you read this site, it should
   feel like reading Annals of Mathematics — at midnight.
   ============================================================ */

:root {
  /* Dark academic palette */
  --page: #0b0d10;
  --surface: #12151a;
  --panel: #1a1e25;
  --ink: #e8e6e3;
  --ink-secondary: #c4c1bc;
  --muted: #8a8580;
  --rule: #2a2e35;
  --accent: #5eead4;
  --accent-blue: #7dd3fc;
  --accent-gold: #fcd34d;
  --accent-rose: #fda4af;
  --theorem-bg: #111520;
  --proof-bg: #10130e;
  --definition-bg: #14110e;

  /* Academic typography — loaded via Google Fonts */
  --font-serif: 'STIX Two Text', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-sans: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Layout — journal column width */
  --max-width: 740px;
  --wide-width: 920px;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-serif);
  background: var(--page);
  color: var(--ink);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink);
}

/* ============================================================
   Navigation — understated, journal header
   ============================================================ */

header {
  border-bottom: 2px solid var(--rule);
  padding: 1rem 0;
  position: relative;
}

nav {
  width: min(var(--wide-width), calc(100vw - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  transition: opacity 160ms ease;
}

.logo:hover { opacity: 0.7; }
.logo span { color: var(--accent); }
.logo-icon { width: 20px; height: 20px; }

/* Mobile: hamburger menu */
.nav-links {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--rule);
  padding: 0.5rem 0;
  z-index: 100;
}

.nav-links.open { display: flex; }

.nav-links a {
  font-family: var(--font-sans);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 160ms ease;
  padding: 0.6rem 1.5rem;
}

.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.03); }

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--muted);
  border-radius: 1px;
  transition: all 200ms ease;
}

/* More dropdown (hidden on mobile — everything is flat) */
.nav-more { display: none; }
.nav-more summary { list-style: none; cursor: pointer; }
.nav-more summary::-webkit-details-marker { display: none; }

/* Desktop: horizontal nav, no hamburger */
@media (min-width: 700px) {
  header { position: relative; }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 1.8rem;
    position: static;
    background: none;
    border: none;
    padding: 0;
  }

  .nav-links a {
    padding: 0;
    font-size: 0.82rem;
    /* text-transform removed for mixed-case badge names */
    letter-spacing: 0.06em;
  }

  .nav-links a:hover { background: none; }

  .nav-toggle { display: none; }

  /* More dropdown on desktop */
  .nav-more {
    display: inline-block;
    position: relative;
  }
  .nav-more summary {
    font-family: var(--font-sans);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    /* text-transform removed for mixed-case badge names */
    letter-spacing: 0.06em;
    transition: color 160ms ease;
    user-select: none;
  }
  .nav-more summary:hover { color: var(--ink); }
  .nav-more summary::after { content: ' +'; font-size: 0.7rem; }
  .nav-more[open] summary::after { content: ' -'; }

  .nav-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 0.4rem 0;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 200;
  }
  .nav-dropdown a {
    display: block;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
  }
  .nav-dropdown a:hover { background: rgba(255,255,255,0.05); }
}

/* ============================================================
   Main
   ============================================================ */

.site-caveat {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  opacity: 0.6;
  border-bottom: 1px solid var(--rule);
}
.site-caveat a { color: var(--muted); text-decoration: underline; }

main {
  width: min(var(--max-width), calc(100vw - 48px));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

/* ============================================================
   Hero — journal title page
   ============================================================ */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero h1 span { color: var(--accent); }

.tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}

.subtitle {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.agent-callout a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

/* ============================================================
   Cards — journal article listings
   ============================================================ */

.experiments-list { margin: 2rem 0; }

.experiments-list h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 600;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

.experiment-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
  border-radius: 2px 8px 8px 2px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-left-color 200ms ease, background 200ms ease;
}

.experiment-card:hover {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 2%, var(--surface));
}

.experiment-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: 0.3rem 0;
  line-height: 1.4;
  font-weight: 600;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
}

.card-top-row time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.card-badges {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.card-summary {
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-family: var(--font-serif);
  line-height: 1.55;
  margin: 0.2rem 0 0.5rem;
}

/* Legacy — keep for any pages still using old markup */
.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-header time { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.card-meta { color: var(--muted); font-size: 0.78rem; font-family: var(--font-mono); }

.conjecture-age {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-gold);
  background: color-mix(in srgb, var(--accent-gold) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-gold) 20%, transparent);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.card-result {
  margin: 0.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.3rem;
}

.card-hw {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.6;
}

/* ============================================================
   Tags — small, typographic
   ============================================================ */

.tags, .card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }

.tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  border: 1px solid;
}

.tag-domain { border-color: color-mix(in srgb, var(--accent-blue) 30%, transparent); color: var(--accent-blue); background: color-mix(in srgb, var(--accent-blue) 5%, transparent); }
.tag-hw { border-color: color-mix(in srgb, var(--accent-gold) 30%, transparent); color: var(--accent-gold); background: color-mix(in srgb, var(--accent-gold) 5%, transparent); }
.tag-method { border-color: color-mix(in srgb, var(--accent-rose) 30%, transparent); color: var(--accent-rose); background: color-mix(in srgb, var(--accent-rose) 5%, transparent); }

/* ============================================================
   Status badges
   ============================================================ */

.status {
  font-size: 0.68rem;
  font-family: var(--font-sans);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  /* text-transform removed for mixed-case badge names */
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-in-progress { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #fbbf24; border: 1px solid color-mix(in srgb, #f59e0b 25%, transparent); }
.status-complete { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.status-planned { background: color-mix(in srgb, #94a3b8 8%, transparent); color: #94a3b8; border: 1px solid color-mix(in srgb, #94a3b8 20%, transparent); }
.status-critical { background: color-mix(in srgb, #ef4444 12%, transparent); color: #f87171; border: 1px solid color-mix(in srgb, #ef4444 25%, transparent); }

/* ============================================================
   Certification badges
   ============================================================ */
.cert-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  /* text-transform removed for mixed-case badge names */
  cursor: help;
}
.cert-gold {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(245,158,11,0.08));
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.35);
  text-shadow: 0 0 8px rgba(251,191,36,0.3);
}
.cert-silver {
  background: linear-gradient(135deg, rgba(148,163,184,0.15), rgba(100,116,139,0.08));
  color: #cbd5e1;
  border: 1px solid rgba(148,163,184,0.35);
}
.cert-bronze {
  background: linear-gradient(135deg, rgba(180,83,9,0.15), rgba(146,64,14,0.08));
  color: #d97706;
  border: 1px solid rgba(180,83,9,0.35);
}

.cert-detail {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 0.8rem 0;
}
.cert-detail-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}
.cert-verdict {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.cert-detail-body {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.cert-reviewer { font-style: italic; }
.cert-date { opacity: 0.7; }
.cert-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.3rem 0;
  line-height: 1.4;
}
.cert-link {
  font-size: 0.7rem;
  margin: 0.4rem 0 0;
}
.cert-link a {
  color: var(--accent);
  text-decoration: none;
}
.cert-link a:hover { text-decoration: underline; }

/* Expandable cert detail */
details.cert-detail { margin: 0.8rem 0; }
details.cert-detail[open] .cert-expand-hint { transform: rotate(180deg); }
.cert-detail-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: 8px;
  list-style: none;
}
.cert-detail-summary::-webkit-details-marker { display: none; }
.cert-detail-summary::marker { display: none; content: ""; }
.cert-summary-text { font-size: 0.78rem; color: var(--text-secondary); }
.cert-expand-hint { font-size: 0.7rem; color: var(--text-secondary); margin-left: auto; opacity: 0.5; transition: transform 0.2s; }
.cert-expanded {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0.8rem 1rem;
}
.cert-table-inner {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}
.cert-table-inner td {
  padding: 0.3rem 0;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 20%, transparent);
  color: var(--text-secondary);
  line-height: 1.4;
}
.cert-label {
  width: 7rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.75rem;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.03em;
  opacity: 0.7;
}
.cert-table-inner code {
  font-size: 0.75rem;
  background: rgba(232,196,122,0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.cert-note-box {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-left: 3px solid color-mix(in srgb, var(--border) 60%, transparent);
  padding: 0.5rem 0.8rem;
  margin: 0.6rem 0;
  border-radius: 0 4px 4px 0;
}
.cert-note-box p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.cert-actions {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem;
}
.cert-action-btn {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.cert-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.cert-action-contribute { border-color: var(--accent); color: var(--accent); }

/* Review ledger rows */
.cert-review-ledger { margin: 0.5rem 0; }
.cert-review-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.72rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 15%, transparent);
  flex-wrap: wrap;
}
.cert-review-date { color: var(--text-secondary); min-width: 5.5rem; font-family: var(--font-mono, monospace); font-size: 0.68rem; }
.cert-review-model { color: #e8c47a; font-weight: 600; }
.cert-review-provider { color: var(--text-secondary); font-size: 0.65rem; }
.cert-review-verdict { font-size: 0.65rem; margin-left: auto; }

/* Remediation rows */
.cert-remediations { margin: 0.5rem 0; }
.cert-remediation-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.72rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 15%, transparent);
}
.cert-rem-severity {
  display: inline-block;
  min-width: 4.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
}
.cert-rem-sev-critical { background: rgba(239,68,68,0.15); color: #f87171; }
.cert-rem-sev-important { background: rgba(251,191,36,0.15); color: #fbbf24; }
.cert-rem-sev-minor { background: rgba(148,163,184,0.15); color: #94a3b8; }
.cert-rem-desc { flex: 1; color: var(--text-secondary); line-height: 1.3; }
.cert-rem-status {
  display: inline-block;
  min-width: 4.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
}
.cert-rem-st-resolved { background: rgba(34,197,94,0.15); color: #22c55e; text-decoration: none; }
a.cert-rem-st-resolved:hover { background: rgba(34,197,94,0.3); text-decoration: underline; }
.cert-rem-st-open { background: rgba(239,68,68,0.1); color: #f87171; }
.cert-rem-st-acknowledged { background: rgba(251,191,36,0.1); color: #fbbf24; }

/* ============================================================
   Experiment detail — meta panel
   ============================================================ */

.experiment-meta {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.75rem 2rem;
  margin-bottom: 3rem;
}

.meta-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.meta-row time { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }
.meta-row .author a { color: var(--accent); text-decoration: none; font-family: var(--font-sans); font-size: 0.85rem; }

.hardware-block, .results-summary { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

.hardware-block h4, .results-summary h4 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.hardware-specs { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.hardware-specs .spec {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--panel);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--rule);
  color: var(--ink-secondary);
}

.results-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.25rem; font-size: 0.85rem; }
.results-summary dt { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }
.results-summary dd { font-family: var(--font-mono); }
.result-pass { color: var(--accent); font-weight: 700; }
.result-fail { color: #ef4444; font-weight: 700; }

/* ============================================================
   Article content — academic journal typography
   ============================================================ */

.experiment-content {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-secondary);
}

.experiment-content h1 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  margin: 3rem 0 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 700;
}

.experiment-content h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 3.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 600;
}

/* Section numbering feel via small-caps */
.experiment-content h3 {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--accent);
  font-weight: 700;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.06em;
}

.experiment-content p { margin-bottom: 1.25rem; }

.experiment-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 50%, transparent);
  transition: border-color 160ms ease;
}
.experiment-content a:hover { border-bottom-style: solid; border-color: var(--accent); }

.experiment-content strong { color: var(--ink); font-weight: 700; }
.experiment-content em { font-style: italic; color: var(--ink); }

/* ============================================================
   MATHEMATICAL ENVIRONMENTS — the heart of the design
   ============================================================ */

/* Display math — the main equation environment */
.katex-display {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: var(--theorem-bg);
  border-left: 2px solid color-mix(in srgb, var(--accent) 60%, var(--rule));
  border-radius: 0 4px 4px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.katex-display > .katex { text-align: center; }

.katex {
  font-size: 1.15em;
  color: var(--ink);
}

/* Inline math — subtle academic styling */
.katex:not(.katex-display .katex) {
  padding: 0 0.12em;
}

.katex .mfrac { padding: 0.12em 0; }
.katex-mathml { position: absolute; clip: rect(1px,1px,1px,1px); padding: 0; border: 0; height: 1px; width: 1px; overflow: hidden; }

/* Consecutive display equations — group them */
.katex-display + .katex-display { margin-top: -1rem; }

/* ============================================================
   Theorem/Proof/Lemma environments via blockquotes

   In markdown:
     > **Theorem.** Statement here...

   Gets styled as a proper theorem environment.
   ============================================================ */

.experiment-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--accent-blue);
  border-radius: 0 4px 4px 0;
  background: var(--theorem-bg);
  font-style: normal;
  color: var(--ink-secondary);
  position: relative;
}

/* Proof-style blockquotes: italic body, QED square implied */
.experiment-content blockquote em {
  font-style: italic;
}

/* Nested blockquote = proof environment */
.experiment-content blockquote blockquote {
  border-left-color: var(--muted);
  background: var(--proof-bg);
  margin: 1rem 0 0.5rem;
  padding: 1rem 1.5rem;
  font-style: italic;
}

/* QED symbol after proofs */
.experiment-content blockquote blockquote::after {
  content: '□';
  display: block;
  text-align: right;
  color: var(--muted);
  font-style: normal;
  margin-top: 0.5rem;
}

/* Definition environment */
.experiment-content blockquote:has(strong:first-child) {
  border-left-color: var(--accent-gold);
  background: var(--definition-bg);
}

/* ============================================================
   Tables — journal-quality data presentation
   ============================================================ */

.experiment-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.85rem;
  display: block;
  overflow-x: auto;
}

.experiment-content th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.06em;
  font-weight: 700;
  white-space: nowrap;
}

.experiment-content td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 50%, transparent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.experiment-content tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 3%, transparent);
}

.experiment-content table strong { color: var(--accent); }

/* ============================================================
   Code — academic monospace
   ============================================================ */

.experiment-content code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--panel);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  color: var(--accent);
  border: 1px solid var(--rule);
}

.experiment-content pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.55;
}

.experiment-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  border: none;
  border-radius: 0;
}

/* ============================================================
   Lists — academic numbering feel
   ============================================================ */

.experiment-content ul, .experiment-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.experiment-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.experiment-content li p { margin-bottom: 0.5rem; }

/* Ordered lists in academic style */
.experiment-content ol {
  list-style-type: decimal;
}

.experiment-content ol ol { list-style-type: lower-alpha; }
.experiment-content ol ol ol { list-style-type: lower-roman; }

/* ============================================================
   Horizontal rules — section dividers
   ============================================================ */

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

/* Three-star divider style */
.experiment-content hr::after {
  content: '§';
  display: block;
  text-align: center;
  margin-top: -0.75em;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--page);
  width: 2em;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Images
   ============================================================ */

.experiment-content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 2rem 0;
  border: 1px solid var(--rule);
}

/* ============================================================
   Links footer
   ============================================================ */

.experiment-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--rule);
}

.code-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  transition: background 160ms ease;
}

.code-link:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ============================================================
   About page
   ============================================================ */

.about-page h1 { font-family: var(--font-serif); margin-bottom: 1.5rem; }
.about-page h2 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--ink); margin: 2.5rem 0 0.75rem; font-weight: 600; letter-spacing: -0.02em; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
.about-page p { color: var(--ink-secondary); margin-bottom: 1rem; line-height: 1.8; }
.about-page ul { margin: 0.5rem 0 1.5rem 1.5rem; }
.about-page li { margin-bottom: 0.5rem; line-height: 1.7; color: var(--ink-secondary); }
.about-page a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--accent) 50%, transparent); }
.about-page a:hover { border-bottom-style: solid; }
.who-section { display: flex; gap: 1.5rem; align-items: flex-start; }
.profile-pic { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--rule); flex-shrink: 0; }

/* ============================================================
   Home about section
   ============================================================ */

.about { margin: 3.5rem 0; padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.about h2 { font-family: var(--font-sans); font-size: 0.72rem; color: var(--muted); margin-bottom: 0.75rem; /* text-transform removed for mixed-case badge names */ letter-spacing: 0.1em; font-weight: 700; }
.about p { color: var(--muted); margin-bottom: 0.5rem; font-size: 0.9rem; }
.about a { color: var(--accent); text-decoration: none; }

/* ============================================================
   Changelog — auto-generated from git at build time
   ============================================================ */

.changelog {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  margin-top: 3rem;
}
.changelog-inner {
  width: min(var(--max-width), calc(100vw - 48px));
  margin: 0 auto;
}
.changelog h3 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--muted);
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.changelog-entries {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cl-entry {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.cl-entry time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  min-width: 3.5rem;
  opacity: 0.6;
}
.cl-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.04em;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
}
.cl-finding { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cl-experiment { color: var(--accent-blue); background: color-mix(in srgb, var(--accent-blue) 8%, transparent); }
.cl-verification { color: var(--accent-gold); background: color-mix(in srgb, var(--accent-gold) 8%, transparent); }
.cl-data { color: var(--accent-rose); background: color-mix(in srgb, var(--accent-rose) 8%, transparent); }
.cl-infra { color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent); }
.cl-update { color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent); }
.cl-msg {
  color: var(--ink-secondary);
  font-family: var(--font-serif);
}
@media (max-width: 700px) {
  .cl-entry { flex-wrap: wrap; }
  .cl-entry time { min-width: auto; }
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  border-top: 2px solid var(--rule);
  padding: 2.5rem 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-sans);
}

footer .disclaimer {
  width: min(var(--max-width), calc(100vw - 48px));
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  text-align: left;
}

footer .disclaimer p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  font-family: var(--font-sans);
}

footer .agent-note {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

footer a { color: var(--accent); text-decoration: none; }
footer .copyright { margin-top: 0.3rem; font-size: 0.7rem; color: var(--muted); opacity: 0.7; }
footer .copyright a { color: var(--muted); border-bottom: 1px dotted var(--muted); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  html { font-size: 16px; }
  nav { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
  main { padding: 1.5rem 0 3rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .experiment-meta { padding: 1.25rem; }
  .experiment-content h1 { font-size: 1.5rem; }
  .experiment-content h2 { font-size: 1.2rem; padding-top: 1.5rem; }
  .hardware-specs { flex-direction: column; }
  .results-summary dl { grid-template-columns: 1fr; }
  .katex-display { margin-left: -24px; margin-right: -24px; border-radius: 0; padding: 1.25rem 1.5rem; }
  .experiment-content pre { margin-left: -24px; margin-right: -24px; border-radius: 0; }
  .who-section { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 400px) {
  html { font-size: 15px; }
  .hero h1 { font-size: 1.5rem; }
}

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

/* ============================================================
   Connect / Get Started Section
   ============================================================ */

.connect {
  margin-top: 4rem;
}
.connect h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.connect-intro {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
@media (max-width: 700px) {
  .connect-grid { grid-template-columns: 1fr; }
}
.connect-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}
.connect-card:hover {
  border-color: rgba(232,196,122,0.25);
}
.connect-mcp {
  grid-column: 1 / -1;
  border-left: 3px solid var(--accent);
}
.connect-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 0.5rem 0;
  color: var(--ink);
}
.connect-card p {
  color: var(--ink-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 0.8rem;
}
.connect-url {
  display: block;
  background: rgba(232,196,122,0.06);
  border: 1px solid rgba(232,196,122,0.15);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e8c47a;
  margin-bottom: 1rem;
  user-select: all;
}
.connect-configs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.connect-configs details {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.connect-configs summary {
  padding: 0.5rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}
.connect-configs summary:hover {
  color: #e8c47a;
}
.connect-configs pre {
  margin: 0;
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-x: auto;
  border-top: 1px solid var(--rule);
  background: rgba(0,0,0,0.1);
}
.connect-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e8c47a;
  text-decoration: none;
  background: rgba(232,196,122,0.06);
  border: 1px solid rgba(232,196,122,0.2);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  transition: background 0.15s ease;
}
.connect-btn:hover {
  background: rgba(232,196,122,0.12);
}
.connect-note {
  font-size: 0.75rem !important;
  color: var(--muted) !important;
  font-style: italic;
  margin-top: 0.4rem;
}

/* ============================================================
   Rosetta Stone: CUDA for Mathematicians & Computer Scientists
   ============================================================ */

.rosetta {
  margin-bottom: 4rem;
}
.rosetta h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.rosetta-intro {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
}
.rosetta-example {
  margin-bottom: 3rem;
}
.rosetta-example h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.rosetta-problem {
  color: var(--ink-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.rosetta-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 800px) {
  .rosetta-columns { grid-template-columns: 1fr; }
}
.rosetta-col {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}
.rosetta-math {
  border-top: 3px solid #6a9fb5;
}
.rosetta-cs {
  border-top: 3px solid #b59a6a;
}
.rosetta-col h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.06em;
  margin: 0 0 1.2rem 0;
}
.rosetta-math h4 { color: #6a9fb5; }
.rosetta-cs h4 { color: #b59a6a; }

.rosetta-step {
  margin-bottom: 1.2rem;
}
.rosetta-step:last-child {
  margin-bottom: 0;
}
.rosetta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  /* text-transform removed for mixed-case badge names */
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.rosetta-step p {
  color: var(--ink-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}
.rosetta-bridge {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.rosetta-bridge .rosetta-label {
  color: #e8c47a;
}
.rosetta-bridge p {
  color: var(--ink);
  font-size: 0.85rem;
}

.rosetta-convergence {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid #e8c47a;
  border-radius: 6px;
}
.rosetta-convergence p {
  color: var(--ink-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}
.rosetta-convergence p:last-child {
  margin-bottom: 0;
}
.rosetta-convergence strong {
  color: #e8c47a;
}

.rosetta-code {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.2rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-secondary);
  overflow-x: auto;
  white-space: pre;
}

/* Rosetta: third column — agentic conversation */
.rosetta-columns {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 1100px) {
  .rosetta-columns { grid-template-columns: 1fr; }
}
.rosetta-agent {
  border-top: 3px solid #7ab56a;
}
.rosetta-agent h4 { color: #7ab56a; }

.rosetta-chat {
  margin-bottom: 0.8rem;
}
.rosetta-human-label {
  color: #9ab5d0 !important;
}
.rosetta-agent-label {
  color: #7ab56a !important;
}
.rosetta-human {
  background: rgba(154,181,208,0.06);
  border-left: 2px solid rgba(154,181,208,0.25);
  padding: 0.5rem 0.8rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.83rem !important;
}
.rosetta-ai {
  background: rgba(122,181,106,0.06);
  border-left: 2px solid rgba(122,181,106,0.25);
  padding: 0.5rem 0.8rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.83rem !important;
}

.rosetta-agent-note {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin: -0.5rem 0 1.2rem 0;
  padding: 0.6rem 0.8rem;
  background: rgba(122,181,106,0.04);
  border-radius: 4px;
  border: 1px solid rgba(122,181,106,0.1);
}
