:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-muted: #eef3f8;
  --text: #15253a;
  --muted: #627286;
  --line: #d9e3ee;
  --accent: #1b63f0;
  --accent-strong: #0e4fd1;
  --dark: #102033;
  --shadow: 0 28px 80px rgba(16, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle at top left, rgba(27, 99, 240, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 20px auto;
  padding: 18px;
  border: 1px solid rgba(217, 227, 238, 0.9);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.brand {
  text-decoration: none;
  display: grid;
  gap: 6px;
  color: inherit;
}

.brand-kicker,
.section-kicker,
.label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-kicker,
.section-kicker {
  color: var(--accent);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.language-switch .is-active {
  color: var(--accent);
}

.language-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #aab4c0;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.language-toggle.is-english {
  background: #f97316;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.language-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(16, 32, 51, 0.2);
  transition: transform 0.2s ease;
}

.language-toggle[aria-pressed="true"] .language-toggle-thumb {
  transform: translateX(20px);
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.04);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 30px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(27, 99, 240, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.hero-copy h1,
.section h2,
.cta-panel h2 {
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(38px, 5vw, 60px);
  max-width: 13ch;
}

.hero-copy p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 66ch;
}

.hero-metrics {
  display: grid;
  gap: 14px;
}

.hero-metrics article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.hero-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.section {
  margin-top: 18px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 4px 6px;
}

.section h2 {
  font-size: clamp(28px, 4vw, 42px);
  max-width: 14ch;
}

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

.review-card {
  padding: 22px;
}

.review-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.review-card p {
  color: var(--muted);
  line-height: 1.75;
}

.case {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 24px;
  margin-bottom: 16px;
}

.case-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.icon-frame {
  width: 124px;
  height: 124px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  display: grid;
  place-items: center;
}

.icon-frame img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.pill,
.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid #dee7f0;
  font-size: 13px;
  font-weight: 600;
  color: #314358;
}

.repo-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.repo-link,
.button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 18px 36px rgba(27, 99, 240, 0.18);
}

.case-main h3,
.capability h3 {
  font-size: 30px;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 12px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.case-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.case-grid h4 {
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.case-grid p,
.capability p,
.cta-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

.capability {
  padding: 22px;
}

.capability h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.cta-panel {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #102033, #17304d);
  color: #f2f7fd;
}

.cta-panel p {
  color: #ccd8e6;
  max-width: 64ch;
  margin-top: 10px;
}

.site-footer {
  margin-top: 18px;
  padding: 16px 8px 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .hero,
  .review-grid,
  .case,
  .capability-grid,
  .case-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .case {
    grid-template-columns: 1fr;
  }

  .capability-grid,
  .case-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100vw - 16px));
    margin: 8px auto;
    padding: 12px;
    border-radius: 24px;
  }

  .site-header {
    flex-direction: column;
    padding: 6px 2px 12px;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .language-switch {
    width: 100%;
    justify-content: center;
  }

  .site-nav a,
  .repo-link,
  .button {
    width: 100%;
  }

  .hero,
  .case,
  .capability,
  .cta-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-copy h1,
  .section h2 {
    max-width: none;
    font-size: clamp(30px, 9vw, 40px);
  }

  .case-main h3 {
    font-size: 24px;
  }

  .hero-metrics,
  .review-grid,
  .capability-grid,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .icon-frame {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .icon-frame img {
    width: 56px;
    height: 56px;
  }

  .cta-panel {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100%, calc(100vw - 12px));
    padding: 10px;
    border-radius: 20px;
  }

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

  .site-nav a,
  .repo-link,
  .button {
    text-align: center;
  }
}
