/* SLASH project page styles: white academic layout with a sticky section nav, following the lab's project-page conventions. */

:root {
  color-scheme: light;
  --page: #ffffff;
  --ink: #182c39;
  --body: #334653;
  --muted: #596973;
  --accent: #096b61;
  --accent-dark: #07564f;
  --accent-soft: #eef5f1;
  --line: #dde4e1;
  --code-bg: #f6f8f7;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 650; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.35; }

.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.section { padding-block: 64px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 28px; }
.section-heading > p { margin-top: 12px; font-size: 18px; }
.eyebrow { color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 10px 18px; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

/* Header */

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.wordmark { color: var(--ink); font-size: 22px; font-weight: 750; letter-spacing: 0.02em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--body); font-size: 15px; font-weight: 550; text-decoration: none; }
.nav-links a:hover { color: var(--accent); text-decoration: underline; }
.nav-paper { font-size: 15px; font-weight: 650; white-space: nowrap; text-decoration: none; }

.hero { padding-block: 56px 48px; text-align: center; }
.hero .eyebrow { margin-bottom: 16px; }
.project-name { display: block; color: var(--accent); font-size: clamp(3rem, 6vw, 4.2rem); font-weight: 760; line-height: 1.05; letter-spacing: 0.02em; }
.paper-title { display: block; margin: 18px auto 0; font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 620; line-height: 1.25; letter-spacing: -0.02em; }
.authors { margin-top: 24px; color: var(--ink); font-size: 19px; }
.affiliation { margin-top: 2px; color: var(--muted); }
.hero-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; font-weight: 650; text-decoration: none; }
.button-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); color: #fff; }
.button-secondary { background: #fff; color: var(--ink); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent); }
.button.is-disabled { color: var(--muted); cursor: default; }
.button.is-disabled:hover { border-color: var(--line); color: var(--muted); }
.hero-summary { margin: 30px auto 0; font-size: 20px; line-height: 1.55; }

/* Abstract with the teaser figure beside it */

.abstract-section { padding-block: 48px 64px; border-top: 1px solid var(--line); }
.abstract-copy { display: flow-root; }
.abstract-copy h2 { margin-bottom: 16px; }
.abstract-copy p { font-size: 17px; line-height: 1.75; }
.abstract-copy p + p { margin-top: 14px; }
.concept-figure { float: right; width: 480px; margin: 0 0 16px 32px; }

/* Figures */

.figure-frame { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.figure-frame img { width: 100%; }
.figure-caption { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; text-align: center; }

.col-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); color: var(--muted); font-size: clamp(9px, 1.4vw, 14px); line-height: 1.3; text-align: center; margin-bottom: 4px; }

/* Linked before/after comparison */

.toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.toggle-btn { border: 1px solid var(--line); border-radius: 8px; padding: 5px 18px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.toggle-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }

.compare-pair { --pos: 50%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-title { margin-bottom: 4px; color: var(--muted); font-size: 15px; text-align: center; }
.compare { position: relative; overflow: hidden; border-radius: 6px; user-select: none; }
.compare-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-top img { width: 100%; height: 100%; object-fit: cover; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); pointer-events: none; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-label { position: absolute; top: 6px; padding: 1px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px; pointer-events: none; }
.compare-label.left { left: 6px; }
.compare-label.right { right: 6px; }
.depth-legend { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.depth-legend .ramp { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0d0887, #7e03a8, #cc4778, #f89540, #f0f921); }

/* Threat model steps */

.pipeline { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; }
.pipeline li { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step-label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; }
.pipeline p { margin-top: 8px; }

.explanation { margin-top: 24px; padding: 22px 26px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.explanation p { margin-top: 8px; }


/* Method */

.method { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.method-steps { margin: 0; padding-left: 22px; }
.method-steps li + li { margin-top: 18px; }
.method-steps li::marker { color: var(--accent); font-weight: 700; }
.method-steps p { margin-top: 6px; }

/* Results */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.stat-value { display: block; color: var(--accent); font-size: 32px; font-weight: 750; line-height: 1.2; }
.stat-label { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.findings-list { margin-top: 12px; }
.finding { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding-block: 22px; }
.finding + .finding { border-top: 1px solid var(--line); }

.evidence-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 16px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 8px; }
.gallery figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }

.closing-note { margin-top: 16px; padding: 16px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* BibTeX */

.citation-section { padding-block: 56px; border-top: 1px solid var(--line); }
.citation-section .section-heading { margin-bottom: 20px; }
.bibtex-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.bibtex-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.copy-button { border: 1px solid #bccdc3; border-radius: 6px; padding: 5px 12px; background: #fff; color: var(--accent-dark); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.copy-button:hover { border-color: var(--accent); }
pre { margin: 0; overflow-x: auto; padding: 20px; background: var(--code-bg); font-size: 15px; line-height: 1.7; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 26px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.footer a { text-decoration: none; }

/* Responsive */

@media (max-width: 950px) {
  .nav-links { display: none; }
  .method { grid-template-columns: 1fr; }
  .concept-figure { float: none; width: auto; max-width: 480px; margin: 0 auto 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finding { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .section { padding-block: 44px; }
  .hero { padding-block: 40px; }
  .authors { font-size: 17px; }
  .hero-summary { font-size: 18px; }
  .compare-pair, .stats { grid-template-columns: 1fr; }
  .pipeline { gap: 10px; }
  .pipeline li { padding: 14px; }
  .pipeline h3 { font-size: 17px; }
  .pipeline p { font-size: 15px; line-height: 1.55; }
  .figure-frame { padding: 8px; }
  .explanation { padding: 18px; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
}

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