:root {
  --ink: #17201b;
  --ink-soft: #4c5a52;
  --paper: #f6f8f3;
  --white: #ffffff;
  --line: #d8ded3;
  --green: #1d8f63;
  --green-dark: #0f5137;
  --yellow: #e7b91e;
  --red: #c94b34;
  --blue: #315f8a;
  --shadow: 0 18px 50px rgba(18, 31, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Athelas, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 34px;
  color: var(--white);
  background: rgba(10, 20, 14, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links a {
  text-decoration: none;
}

.brand {
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.86rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
}

.nav-links a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 7vw 60px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 19, 12, 0.92), rgba(8, 21, 15, 0.62) 46%, rgba(8, 21, 15, 0.18)),
    url("assets/case_box_unsafe.jpg") center / cover no-repeat;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: repeating-linear-gradient(
    135deg,
    var(--yellow) 0 18px,
    #1c241f 18px 36px
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
}

.venue,
.section-kicker {
  margin: 0 0 16px;
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.venue {
  color: var(--yellow);
}

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

h1 {
  max-width: 1040px;
  margin-bottom: 18px;
  font-size: 3.45rem;
  line-height: 1.02;
  font-weight: 800;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.25rem;
  line-height: 1.14;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.authors {
  max-width: 860px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

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

.button,
.copy-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.copy-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #162018;
  background: var(--yellow);
  border-color: var(--yellow);
}

.button.ghost {
  background: transparent;
}

.metric-strip {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.metric-strip div {
  padding: 14px 18px;
  background: rgba(7, 19, 12, 0.48);
}

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

.metric-strip strong {
  font-size: 1.4rem;
  line-height: 1.1;
}

.metric-strip span {
  color: rgba(255, 255, 255, 0.78);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
}

.section {
  padding: 86px 7vw;
}

.section-kicker {
  color: var(--green-dark);
}

.section-lead {
  max-width: 860px;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.36fr) minmax(0, 1fr);
  gap: 44px;
  background: var(--white);
}

.intro-grid p {
  max-width: 930px;
  color: var(--ink-soft);
}

.visual-band {
  padding: 72px 7vw;
  background: #e8eee4;
}

.wide-figure,
.framed-figure,
.side-figure {
  margin: 0;
}

.wide-figure img,
.framed-figure img,
.side-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 14px;
  color: var(--ink-soft);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}

.method-section {
  background: var(--paper);
}

.pipeline-steps,
.task-grid,
.sample-grid,
.release-grid {
  display: grid;
  gap: 18px;
}

.pipeline-steps {
  grid-template-columns: repeat(3, 1fr);
  margin: 34px 0 40px;
}

.pipeline-steps article,
.task-card,
.sample-card,
.release-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(18, 31, 24, 0.07);
}

.pipeline-steps article {
  padding: 24px;
}

.pipeline-steps span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--green);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
}

.pipeline-steps p,
.task-card p,
.sample-card p,
.release-grid p {
  color: var(--ink-soft);
}

.benchmark-section {
  background: var(--white);
}

.task-grid {
  grid-template-columns: repeat(2, 1fr);
  margin: 32px 0 42px;
}

.task-card {
  padding: 28px;
  border-top: 5px solid var(--green);
}

.task-card.accent {
  border-top-color: var(--blue);
}

.task-count {
  margin-bottom: 8px;
  color: var(--green-dark);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

dl {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

dt {
  color: var(--ink);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--ink-soft);
}

.sample-section {
  background: #eef3ee;
}

.sample-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
}

.sample-card {
  overflow: hidden;
}

.sample-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #dfe6df;
}

.sample-body {
  padding: 18px;
}

.tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--white);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.tag.safe {
  background: var(--green);
}

.tag.warning {
  background: var(--yellow);
  color: #1e2419;
}

.tag.inspect {
  background: var(--blue);
}

.tag.fail {
  background: var(--red);
}

.results-section {
  background: var(--paper);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
  margin-top: 30px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
}

caption {
  max-width: 68ch;
  padding: 18px 20px 10px;
  color: var(--ink-soft);
  text-align: left;
  white-space: normal;
}

caption a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

th,
td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

thead th {
  color: var(--ink);
  background: #edf2ea;
  font-size: 0.78rem;
  text-transform: uppercase;
}

tbody tr.winner {
  background: #f4fbf1;
}

.side-figure img {
  aspect-ratio: 1.18 / 1;
  object-fit: contain;
  padding: 14px;
}

.release-section {
  background: var(--white);
}

.release-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
}

.release-grid article {
  padding: 22px;
  border-top: 4px solid var(--yellow);
}

.release-grid h3 a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.release-grid code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef2ec;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.citation-section {
  background: #17201b;
  color: var(--white);
}

.citation-section .section-kicker {
  color: var(--yellow);
}

.citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.copy-button {
  border-color: rgba(255, 255, 255, 0.3);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #0d130f;
  color: #eef6ed;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

.cite-note {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.92rem;
}

.cite-note a {
  color: var(--yellow);
}

.footer {
  padding: 28px 7vw;
  color: var(--ink-soft);
  background: var(--white);
  font-family: Optima, Candara, "Trebuchet MS", sans-serif;
  font-size: 0.88rem;
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--green-dark);
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    padding: 14px 20px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
  }

  .hero {
    min-height: 88vh;
    padding: 118px 24px 48px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .pipeline-steps,
  .result-layout,
  .release-grid {
    grid-template-columns: 1fr;
  }

  .sample-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: absolute;
    display: block;
  }

  .nav-links {
    margin-top: 10px;
    justify-content: flex-start;
    font-size: 0.8rem;
  }

  .hero {
    padding: 134px 18px 40px;
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .hero-copy,
  .authors {
    font-size: 1rem;
  }

  .button {
    flex: 1 1 calc(50% - 6px);
  }

  .section,
  .visual-band {
    padding: 58px 18px;
  }

  .metric-strip div {
    padding: 12px;
  }

  .task-grid,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .citation-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
