:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #161616;
  --muted: #5f6268;
  --line: #e7e0d7;
  --green: #5da65a;
  --red: #ef6a6a;
  --orange: #f2993a;
  --purple: #845ee6;
  --teal: #0f827b;
  --blue: #447ea6;
  --shadow: 0 24px 70px rgba(40, 30, 18, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(93, 166, 90, 0.16), transparent 34rem),
    radial-gradient(circle at 96% 4%, rgba(132, 94, 230, 0.14), transparent 30rem),
    linear-gradient(180deg, #fffdf8 0%, var(--bg) 44%, #f7f3ee 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.62;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0.8rem auto 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(231, 224, 215, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(40, 30, 18, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0.45rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--green), var(--teal), var(--purple), var(--red), var(--orange), var(--green));
  box-shadow: 0 0 0 5px rgba(15, 130, 123, 0.08);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
  background: #f3eee8;
}

main {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: end;
  min-height: 72vh;
  padding: 6.8rem 0 4rem;
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0.4rem 0 1.1rem;
  font-size: clamp(2.7rem, 5.8vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.authors {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 720;
}

.affiliation {
  margin: 0.15rem 0 1.2rem;
  color: var(--muted);
}

.tagline {
  max-width: 780px;
  margin: 0;
  color: #3f4146;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid rgba(22, 22, 22, 0.1);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(40, 30, 18, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(40, 30, 18, 0.12);
}

.button.primary {
  border-color: transparent;
  background: var(--ink);
  color: white;
}

.button.ghost {
  background: transparent;
  box-shadow: none;
}

.button-row.compact {
  margin-top: 1rem;
}

.copy-status {
  color: var(--teal);
  font-weight: 700;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: rgba(239, 106, 106, 0.16);
}

.mini-chart {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mini-chart div {
  padding: 1rem;
  border-radius: 18px;
  background: #f7f4ef;
}

.mini-chart span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.mini-chart strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--red);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.mini-chart div:first-child strong {
  color: var(--green);
}

.hero-panel p {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  color: #494b50;
}

.section {
  padding: 4.3rem 0;
}

.section.narrow {
  width: min(820px, 100%);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.section h3 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.section p {
  color: #46484d;
  font-size: 1.02rem;
}

.section-head {
  max-width: 820px;
  margin-bottom: 1.6rem;
}

.image-card,
.method-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.image-card {
  overflow: hidden;
}

.image-card img {
  width: 100%;
  background: white;
}

.future-case img {
  width: 108%;
  max-width: none;
  margin: -1.2% -4% -0.5%;
}

.gradient-text {
  background: linear-gradient(
    90deg,
    #5B8CFF 0%,
    #8A5CF6 40%,
    #FF4D8D 75%,
    #FF8A00 100%
  );

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  font-weight: 800;
}

.image-card figcaption {
  padding: 1rem 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.future-case figcaption {
  padding-top: 0.65rem;
}

.hero-image img {
  display: block;
  margin-bottom: 0;
}

.hero-image figcaption {
  padding-top: 0;
}

.method-grid,
.result-grid,
.two-col {
  display: grid;
  gap: 1rem;
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.method-card,
.result-card {
  padding: 1.25rem;
}

.method-card {
  position: relative;
  overflow: hidden;
}

.method-card::after {
  content: "";
  position: absolute;
  right: -2.2rem;
  top: -2.2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  opacity: 0.16;
}

.method-card.red::after {
  background: var(--red);
}

.method-card.orange::after {
  background: var(--orange);
}

.method-card.teal::after {
  background: var(--teal);
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 0.86rem;
  font-weight: 820;
}

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

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

.result-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.result-card strong {
  display: block;
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.result-card.green strong {
  color: var(--green);
}

.result-card.purple strong {
  color: var(--purple);
}

.result-card.orange strong {
  color: var(--orange);
}

.result-card.red strong {
  color: var(--red);
}

.wide {
  margin-top: 1rem;
}

.medium {
  width: min(680px, 100%);
  margin: 1rem auto 0;
}

pre {
  overflow-x: auto;
  margin: 1rem 0 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #1e1d1b;
  color: #f7f2ea;
  box-shadow: var(--shadow);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--teal);
  font-weight: 760;
  text-decoration: none;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin-top: 1.4rem;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-card video {
  display: block;
  width: 100%;
  background: #fff;
}

.video-card figcaption {
  padding: 0.85rem 1.1rem 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.attack-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 0.65rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  vertical-align: 0.08em;
}

.badge-action {
  background: var(--red);
}

.badge-imgpres {
  background: var(--teal);
}

.video-grid.video-grid-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}

.video-grid.video-grid-single .video-card {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    border-radius: 24px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4.5rem;
  }

  .method-grid,
  .result-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .topbar,
  .footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .hero-copy h1 {
    font-size: 2.65rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer {
    flex-direction: column;
  }
}
