:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #66706d;
  --paper: #f8f9f6;
  --surface: #ffffff;
  --mist: #edf1ed;
  --line: #d6ddd7;
  --rust: #a4472e;
  --rust-dark: #71301f;
  --teal: #17766f;
  --green: #527a4d;
  --night: #101917;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 20px 55px rgba(24, 33, 31, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.58;
}

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

a {
  color: inherit;
}

button,
summary {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 4vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  background: rgba(16, 25, 23, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  color: var(--night);
  background: var(--white);
  font-size: 0.78rem;
}

.nav-links {
  gap: 28px;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

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

.mobile-nav {
  display: none;
  position: relative;
}

.more-work-float {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 25;
}

.more-work-float summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  color: var(--white);
  background: rgba(16, 25, 23, 0.92);
  box-shadow: 0 12px 30px rgba(16, 25, 23, 0.2);
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.more-work-float summary::-webkit-details-marker {
  display: none;
}

.more-work-float summary:hover,
.more-work-float summary:focus-visible {
  background: var(--rust-dark);
}

.more-work-toggle {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--night);
  background: var(--white);
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.more-work-float[open] .more-work-toggle {
  transform: rotate(45deg);
}

.more-work-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.more-work-panel > p {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--mist);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.more-work-panel nav {
  display: grid;
}

.more-work-panel a {
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.more-work-panel a:first-child {
  border-top: 0;
}

.more-work-panel a:hover,
.more-work-panel a:focus-visible {
  background: #f4f7f3;
}

.more-work-panel a > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.more-work-panel strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.more-work-panel small {
  flex: 0 0 auto;
  color: var(--rust-dark);
  font-size: 0.72rem;
  font-weight: 850;
}

.more-work-panel em {
  color: var(--muted);
  font-size: 0.79rem;
  font-style: normal;
  line-height: 1.35;
}

.hero {
  position: relative;
  display: flex;
  min-height: 82svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 112px 5vw 66px;
  color: var(--white);
  background: var(--night) url("./images/hero.webp") center / cover no-repeat;
}

.hero::before {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 15, 0.67);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1260px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-kicker,
.section-label,
.metric-tile > span {
  margin: 0;
  color: var(--rust);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #f1b196;
}

.hero h1 {
  max-width: 1160px;
  margin: 14px auto 0;
  letter-spacing: 0;
}

.hero h1 > span {
  display: block;
  font-size: 4.5rem;
  line-height: 1;
}

.hero h1 small {
  display: block;
  max-width: 1040px;
  margin: 18px auto 0;
  font-size: 1.8rem;
  font-weight: 680;
  line-height: 1.22;
}

.authors {
  max-width: 1180px;
  margin: 26px auto 0;
  color: rgba(255, 255, 255, 0.91);
  font-size: 1.04rem;
  font-weight: 680;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  max-width: 1120px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.69);
  font-size: 0.89rem;
}

.author-note {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 0.84rem;
}

.venue {
  display: inline-flex;
  margin-top: 19px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 7px 13px;
  background: rgba(16, 25, 23, 0.58);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 17px;
  font-weight: 780;
  text-decoration: none;
}

.button-light {
  color: var(--night);
  background: var(--white);
}

.button-light:hover,
.button-light:focus-visible {
  color: var(--rust-dark);
  background: #f6eee9;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.intro-layout,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-layout {
  max-width: 1080px;
  padding: 50px 0;
  text-align: center;
}

.abstract-copy {
  margin: 12px 0 0;
  font-size: 1.14rem;
  line-height: 1.65;
}

.section {
  padding: 58px 0;
  scroll-margin-top: 68px;
}

.section-tinted {
  position: relative;
  border-block: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface);
  clip-path: inset(0 -100vmax);
}

.section-heading {
  max-width: 900px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-heading h2,
.reflection-copy h2 {
  margin: 9px 0 0;
  font-size: 2.15rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading > p:last-child,
.reflection-copy > p {
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.metric-tile {
  min-height: 190px;
  padding: 24px;
  background: var(--surface);
}

.metric-tile strong {
  display: block;
  margin-top: 9px;
  font-size: 1.4rem;
  line-height: 1.15;
}

.metric-tile p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.paper-figure {
  min-width: 0;
  margin: 34px 0 0;
}

.paper-figure a {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.paper-figure img {
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  max-width: 880px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.stage-item {
  min-height: 190px;
  border-top: 3px solid var(--rust);
  padding: 18px 16px 16px;
  background: var(--mist);
}

.stage-item:nth-child(2),
.stage-item:nth-child(5) {
  border-color: var(--teal);
}

.stage-item:nth-child(3),
.stage-item:nth-child(6) {
  border-color: var(--green);
}

.stage-item > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.stage-item h3 {
  margin: 8px 0 0;
  font-size: 1.08rem;
}

.stage-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tool-band {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 30px;
  align-items: center;
  margin-top: 34px;
  padding: 28px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--night);
}

.tool-band h3 {
  margin: 7px 0 0;
  font-size: 1.5rem;
}

.tool-band ul {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-band li,
.reflection-tags span {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.84rem;
}

.result-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.result-strip > div {
  min-height: 115px;
  padding: 22px;
  text-align: center;
  background: var(--surface);
}

.result-strip strong {
  display: block;
  color: var(--rust-dark);
  font-size: 2rem;
  line-height: 1;
}

.result-strip span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.88rem;
}

.reflection-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  min-width: 0;
  gap: 36px;
  align-items: center;
  margin-top: 52px;
}

.reflection-figure {
  margin: 0;
}

.reflection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.reflection-tags span {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.applications-section {
  position: relative;
  color: var(--white);
  background: var(--night);
  box-shadow: 0 0 0 100vmax var(--night);
  clip-path: inset(0 -100vmax);
}

.section-heading-light > p:last-child {
  color: rgba(255, 255, 255, 0.68);
}

.paper-figure-dark a {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.paper-figure-dark figcaption {
  color: rgba(255, 255, 255, 0.58);
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
}

.application-grid article {
  min-height: 160px;
  padding: 22px;
  background: #17221f;
}

.application-grid article > span {
  color: #f1b196;
  font-size: 0.76rem;
  font-weight: 850;
}

.application-grid h3 {
  margin: 8px 0 0;
  font-size: 1.15rem;
}

.application-grid p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.citation-section {
  max-width: 960px;
}

.citation-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.citation-box pre {
  overflow-x: auto;
  margin: 0;
  padding: 76px 28px 28px;
  color: #27312e;
  font-size: 0.86rem;
  line-height: 1.65;
}

.copy-button {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 112px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--mist);
  font-weight: 750;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--rust);
  color: var(--rust-dark);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.9rem;
}

.site-footer nav {
  gap: 22px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--rust-dark);
}

@media (max-width: 980px) {
  .hero h1 > span {
    font-size: 3.6rem;
  }

  .hero h1 small {
    font-size: 1.55rem;
  }

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

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

  .reflection-layout {
    grid-template-columns: 1fr;
  }

  .reflection-layout > * {
    min-width: 0;
  }

  .reflection-copy {
    max-width: 820px;
    text-align: center;
    margin: 0 auto;
  }

  .reflection-tags {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 62px;
    padding: 10px 18px;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-nav summary {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
  }

  .mobile-nav nav {
    position: absolute;
    top: 38px;
    right: 0;
    display: grid;
    width: 190px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: #17221f;
    box-shadow: var(--shadow);
  }

  .mobile-nav nav a {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }

  .mobile-nav nav a:first-child {
    border-top: 0;
  }

  .more-work-float {
    top: auto;
    right: 14px;
    bottom: 14px;
  }

  .more-work-float summary {
    min-height: 42px;
    gap: 12px;
    padding: 8px 10px 8px 14px;
  }

  .more-work-panel {
    top: auto;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(360px, calc(100vw - 28px));
  }

  .hero {
    min-height: 84svh;
    padding: 94px 18px 48px;
  }

  .hero h1 > span {
    font-size: 2.7rem;
  }

  .hero h1 small {
    margin-top: 14px;
    font-size: 1.25rem;
  }

  .authors {
    margin-top: 20px;
    font-size: 0.9rem;
  }

  .affiliations {
    display: none;
  }

  .author-note {
    margin-top: 10px;
  }

  .intro-layout {
    padding: 36px 0;
  }

  .abstract-copy {
    font-size: 1rem;
  }

  .section {
    padding: 42px 0;
    scroll-margin-top: 62px;
  }

  .section-heading h2,
  .reflection-copy h2 {
    font-size: 1.7rem;
  }

  .metric-grid,
  .stage-grid,
  .result-strip,
  .application-grid {
    grid-template-columns: 1fr;
  }

  .metric-tile,
  .stage-item,
  .application-grid article {
    min-height: auto;
  }

  .tool-band {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .result-strip > div {
    min-height: auto;
  }

  .paper-figure-wide a {
    overflow-x: auto;
  }

  .paper-figure-wide img {
    width: auto;
    min-width: 840px;
    max-width: none;
  }

  .citation-box pre {
    padding: 72px 20px 24px;
    font-size: 0.76rem;
  }

  .copy-button {
    top: 16px;
    left: 18px;
    right: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand > span:last-child {
    font-size: 0.9rem;
  }

  .hero h1 > span {
    font-size: 2.25rem;
  }

  .hero h1 small {
    font-size: 1.08rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .button {
    min-height: 42px;
    padding: 9px 13px;
    font-size: 0.88rem;
  }
}

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