@charset "utf-8";

:root {
  --page: #f8f9f5;
  --surface: #ffffff;
  --surface-tint: #eef2eb;
  --code-bg: #f1f4ee;
  --ink: #202d2b;
  --muted: #5f6d67;
  --green: #245d50;
  --green-dark: #1b493e;
  --band: #244d43;
  --line: #dce2d9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

code, pre {
  font-family: var(--mono);
}

code {
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12em 0.38em;
  border-radius: 3px;
  border: 1px solid var(--line);
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.site-width {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 40;
  top: 8px;
  left: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--green);
  color: var(--green);
  font-weight: 700;
  transform: translateY(-220%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 249, 245, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
}

.brand-mark:hover {
  text-decoration: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
}

.brand-name span {
  color: var(--green);
}

.brand-venue {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.site-nav a:hover,
.site-nav a[aria-current="location"] {
  color: var(--green);
}

.site-nav a[aria-current="location"] {
  text-decoration: underline;
  font-weight: 700;
}

.nav-external {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

/* Typography helpers */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.accent-line {
  width: 24px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}

.section-block {
  padding-block: 52px;
  border-top: 1px solid var(--line);
}

.section-header {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 35px);
  font-weight: 400;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
  margin-bottom: 0;
}

/* Hero */
.hero {
  padding-block: 54px 48px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.1vw, 48px);
  font-weight: 400;
  letter-spacing: -1.3px;
  line-height: 1.14;
  max-width: 960px;
  margin-bottom: 22px;
}

.hero-authors {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 6px;
}

.hero-authors a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero-authors a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
  text-decoration: none;
}

.hero-affiliation {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn:hover {
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

.btn-colab {
  background: var(--surface-tint);
  border-color: #c2d0c6;
  color: var(--green-dark);
}

.btn-colab:hover {
  background: #e1eae2;
  border-color: var(--green);
  color: var(--green-dark);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px 20px;
}

.metric-value {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.15;
  color: var(--green);
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.metric-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Overview pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 22px 22px 20px;
}

.pillar-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 8px;
}

.pillar-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.28;
  margin-bottom: 10px;
}

.pillar-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.68;
  margin-bottom: 0;
}

/* Figures */
.figure-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 16px 18px 18px;
}

.figure-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}

.figure-zoom img {
  margin-inline: auto;
  border-radius: 3px;
}

.figure-zoom-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.02em;
}

.figure-caption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.68;
  color: var(--muted);
}

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

/* Results subsections */
.result-group {
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.result-group:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.result-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.result-heading h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.4px;
  margin-bottom: 0;
}

.result-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 8px;
}

.result-note {
  font-size: 14px;
  color: var(--muted);
  max-width: 780px;
  margin-bottom: 18px;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
}

.data-table thead th {
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr.row-save td {
  background: #edf4ef;
  color: var(--ink);
}

.data-table tbody tr.row-save td:first-child {
  color: var(--green-dark);
}

.table-wrap-compact {
  margin-bottom: 14px;
}

.data-table-text {
  white-space: normal;
  min-width: 600px;
}

.data-table-text th,
.data-table-text td {
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.data-table-text th:first-child,
.data-table-text td:first-child {
  width: 22%;
}

.subsection-block {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.subsection-block h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.stage-list {
  margin: 18px 0 20px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.stage-list li {
  margin-bottom: 8px;
}

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

.callout-note {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-tint);
  border-left: 3px solid var(--green);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
}

/* Interpretability */
.interp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.interp-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px 20px;
}

.interp-item h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.interp-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.68;
  margin-bottom: 0;
}

/* Deep Forest Green Spotlight Band (matches argonx.dev .current-research) */
.repro-spotlight {
  background: var(--band);
  color: #f6f8f1;
  border-radius: 6px;
  padding: 32px 34px 26px;
  margin-bottom: 28px;
}

.spotlight-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.spotlight-topline .eyebrow {
  color: #c5d6c9;
  margin-bottom: 0;
}

.spotlight-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d9e5d6;
  font-size: 11px;
  font-family: var(--mono);
}

.spotlight-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c0d7a3;
}

.repro-spotlight h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 31px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.5px;
  color: #f6f8f1;
  margin-bottom: 12px;
}

.repro-spotlight p {
  color: #d7e4d5;
  font-size: 14px;
  line-height: 1.75;
  max-width: 860px;
  margin-bottom: 22px;
}

.repro-spotlight code {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f6f8f1;
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-spotlight-primary {
  background: #f6f8f1;
  color: var(--green-dark);
  border-color: #f6f8f1;
}

.btn-spotlight-primary:hover {
  background: #ffffff;
  color: var(--green-dark);
  border-color: #ffffff;
}

.btn-spotlight-ghost {
  background: transparent;
  color: #f6f8f1;
  border-color: #6b8e80;
}

.btn-spotlight-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: #c5d6c9;
}

.repro-spotlight a:focus-visible {
  outline-color: #f6f8f1;
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #4c6f63;
  font-size: 12px;
  color: #c7d7c9;
}

.spotlight-meta strong {
  color: #f6f8f1;
  font-weight: 700;
}

/* Code & Citation Blocks */
.code-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 20px;
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-tint);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--green);
  background: #f8fbf9;
}

.copy-btn[data-copied="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.code-card pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 26px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

/* Lightbox dialog */
.figure-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.figure-dialog::backdrop {
  background: rgba(24, 34, 31, 0.72);
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 34px);
}

.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
  font-size: 13px;
  font-weight: 700;
}

.dialog-close {
  padding: 5px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}

.dialog-close:hover {
  border-color: var(--green);
  color: var(--green);
}

.dialog-body {
  padding: 18px;
  overflow: auto;
}

.dialog-body img {
  margin-inline: auto;
  max-height: 75vh;
  width: auto;
}

.dialog-caption {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 960px) {
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pillars-grid,
  .interp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .site-width {
    width: calc(100% - 36px);
  }

  .site-header {
    position: static;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: 54px;
    padding-block: 10px;
    gap: 6px 14px;
  }

  .site-nav {
    width: 100%;
    gap: 4px 14px;
    font-size: 13px;
  }

  .site-nav a {
    min-height: 30px;
  }

  .nav-external {
    padding-left: 0;
    border-left: 0;
  }

  .hero {
    padding-block: 36px 34px;
  }

  .section-block {
    padding-block: 38px;
  }

  .repro-spotlight {
    padding: 24px 20px 20px;
  }
}

@media (max-width: 520px) {
  .metrics-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
