:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-soft: #ebe6dc;
  --ink: #171717;
  --muted: #65615a;
  --line: #d8d1c5;
  --green: #1f6b4d;
  --green-dark: #114834;
  --amber: #c77d22;
  --blue: #2f67a5;
  --shadow: 0 18px 45px rgba(41, 35, 25, 0.14);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(216, 209, 197, 0.8);
  background: rgba(246, 243, 238, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  align-items: center;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  min-height: 68px;
  padding: 0 24px;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

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

.language-switch {
  align-items: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
}

.nav-links .language-switch a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
}

.nav-links .language-switch a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.hero {
  background: #17251d;
  color: #fff;
  min-height: min(620px, 72vh);
  position: relative;
}

.hero::after {
  background: linear-gradient(180deg, rgba(246, 243, 238, 0), var(--bg));
  bottom: 0;
  content: "";
  height: 130px;
  left: 0;
  position: absolute;
  right: 0;
}

.hero-inner {
  margin: 0 auto;
  max-width: var(--max);
  padding: 112px 24px 150px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.eyebrow {
  color: #f4c57f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  font-size: 88px;
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  max-width: 880px;
}

.hero-copy,
.page-copy {
  color: rgba(255, 255, 255, 0.86);
  font-size: 23px;
  margin: 26px 0 0;
  max-width: 760px;
  overflow-wrap: break-word;
  width: 100%;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  align-items: center;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.wrap {
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 48px 0;
}

.section-header {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  margin-bottom: 30px;
}

.section-kicker {
  color: var(--amber);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.section h2,
.section-title {
  font-size: 48px;
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0;
}

.section-lede {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card,
.project-card,
.benchmark-run,
.note-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(41, 35, 25, 0.04);
  overflow: hidden;
}

.project-card,
.note-card {
  padding: 22px;
}

.card-media,
.media-frame {
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.card-media img,
.media-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 20px;
}

.card h3,
.project-card h3,
.benchmark-run h3,
.note-card h3 {
  font-size: 22px;
  line-height: 1.14;
  margin: 0 0 10px;
}

.card p,
.project-card p,
.benchmark-run p,
.note-card p {
  color: var(--muted);
  margin: 0 0 16px;
}

.status-row,
.tag-list,
.tech-list,
.metric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-badge,
.tag-list li,
.tech-list li,
.metric-list li {
  background: #eee8dc;
  border: 1px solid #ddd3c3;
  border-radius: 999px;
  color: #3c3832;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 9px;
}

.status-badge.live,
.status-badge.experiment {
  background: #dfeee6;
  border-color: #bfd8ca;
  color: var(--green-dark);
}

.status-badge.planned {
  background: #e3ebf5;
  border-color: #c4d4e8;
  color: #244f7e;
}

.status-badge.archived {
  background: #eee9e1;
  border-color: #d8d1c5;
  color: #625b52;
}

.feature {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
}

.feature .media-frame {
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  min-height: 420px;
}

.feature .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.final-game {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  margin-bottom: 24px;
}

.final-game .media-frame {
  aspect-ratio: 16 / 10;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  display: block;
}

.final-game .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.prompt-summary {
  background: #efe9dd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  padding: 22px;
}

.prompt-summary h3 {
  font-size: 22px;
  line-height: 1.14;
  margin: 0 0 8px;
}

.prompt-summary p {
  color: var(--muted);
  margin: 0 0 12px;
}

.prompt-toggle {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.prompt-clip {
  max-height: 170px;
  overflow: hidden;
  position: relative;
}

.prompt-toggle:not(:checked) + .prompt-clip::after {
  background: linear-gradient(180deg, rgba(27, 29, 27, 0), #1b1d1b 82%);
  bottom: 0;
  content: "";
  height: 86px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.prompt-toggle:checked + .prompt-clip {
  max-height: none;
}

.prompt-toggle-label {
  color: var(--green-dark);
  cursor: pointer;
  display: inline-flex;
  font-weight: 850;
  margin-top: 12px;
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

.prompt-toggle:focus-visible ~ .prompt-toggle-label {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.hide-label {
  display: none;
}

.prompt-toggle:checked ~ .prompt-toggle-label .show-label {
  display: none;
}

.prompt-toggle:checked ~ .prompt-toggle-label .hide-label {
  display: inline;
}

.detail-hint {
  font-size: 13px;
  margin-bottom: 12px !important;
}

.comparison-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.comparison-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.comparison-table .col-shot {
  width: 24%;
}

.comparison-table .col-model {
  width: 12%;
}

.comparison-table .col-runtime {
  width: 9%;
}

.comparison-table .col-assignment {
  width: 13%;
}

.comparison-table .col-playability {
  width: 11%;
}

.comparison-table .col-bugs {
  width: 12%;
}

.comparison-table .col-note {
  width: 11%;
}

.comparison-table .col-demo {
  width: 8%;
}

.comparison-table caption {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 14px 18px 0;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  padding: 13px;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: #eee8dc;
  color: #3c3832;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-table tbody th {
  font-size: 17px;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-table td {
  color: var(--muted);
  font-size: 14px;
}

.comparison-shot {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  overflow: hidden;
  width: 100%;
}

.comparison-shot img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.demo-link {
  align-items: center;
  background: var(--green);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  line-height: 1.2;
  min-height: 36px;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.demo-link:hover {
  background: var(--green-dark);
}

body.gallery-open {
  overflow: hidden;
}

.gallery-modal {
  align-items: center;
  background: rgba(20, 18, 15, 0.82);
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 80;
}

.gallery-modal:not([hidden]) {
  display: flex;
}

.gallery-panel {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  max-width: min(1120px, 100%);
  position: relative;
  width: 100%;
}

.gallery-panel figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0;
  overflow: hidden;
}

.gallery-panel img {
  background: #111;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
  width: 100%;
}

.gallery-panel figcaption {
  display: grid;
  gap: 4px;
  padding: 14px 16px 16px;
}

.gallery-panel figcaption strong {
  font-size: 18px;
}

.gallery-description,
.gallery-counter {
  color: var(--muted);
  font-size: 14px;
}

.gallery-close,
.gallery-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  justify-content: center;
}

.gallery-close {
  min-height: 38px;
  padding: 7px 13px;
  position: absolute;
  right: 0;
  top: -52px;
}

.gallery-nav {
  font-size: 34px;
  height: 44px;
  line-height: 1;
  width: 44px;
}

@media (max-width: 1040px) {
  .comparison-table {
    min-width: 920px;
  }
}

.page-hero {
  background: #17251d;
  color: #fff;
}

.page-hero .wrap {
  padding-bottom: 72px;
  padding-top: 72px;
}

.page-copy {
  color: rgba(255, 255, 255, 0.82);
}

.method {
  background: #efe9dd;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

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

.method-item {
  border-left: 3px solid var(--amber);
  padding-left: 14px;
}

.method-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.method-item span {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.benchmark-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.benchmark-run .card-body {
  padding: 22px;
}

.run-meta {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  padding-top: 16px;
}

.run-meta div {
  color: var(--muted);
  font-size: 13px;
}

.run-meta strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
}

.prompt-box {
  background: #1b1d1b;
  border-radius: var(--radius);
  color: #e9e4d9;
  font-size: 14px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  white-space: pre-wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 34px 0;
}

.footer-grid {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
}

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

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
  }

  .hero h1,
  .page-title {
    font-size: 58px;
  }

  .section h2,
  .section-title {
    font-size: 38px;
  }

  .hero-inner {
    padding-top: 84px;
  }

  .section-header,
  .grid.two,
  .grid.three,
  .feature,
  .final-game,
  .method-grid,
  .benchmark-grid {
    grid-template-columns: 1fr;
  }

  .final-game .media-frame,
  .feature .media-frame {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: auto;
  }

  .gallery-panel {
    gap: 10px;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .gallery-nav {
    height: 40px;
    width: 40px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 720px;
  }

  .hero h1,
  .page-title {
    font-size: 36px;
    line-height: 1.03;
  }

  .hero-copy,
  .page-copy {
    font-size: 18px;
  }

  .section h2,
  .section-title {
    font-size: 32px;
  }

  .hero-actions .button,
  .section-actions .button {
    width: 100%;
  }

  .nav-links {
    display: grid;
    gap: 8px 14px;
    grid-template-columns: 1fr 1fr;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero-inner,
  .page-hero .wrap,
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section {
    padding: 52px 0;
  }

  .run-meta {
    grid-template-columns: 1fr;
  }

  .gallery-modal {
    padding: 18px;
  }

  .gallery-panel {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-panel figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .gallery-prev,
  .gallery-next {
    grid-row: 2;
    justify-self: center;
  }

  .gallery-close {
    right: 0;
    top: -46px;
  }
}
