:root {
  --ink: #111318;
  --ink-soft: #1a1d23;
  --paper: #f5f7f5;
  --surface: #ffffff;
  --surface-muted: #e9eceb;
  --text-muted: #656b73;
  --line: #d9dedf;
  --line-dark: #2b2f37;
  --brand: #e83d84;
  --brand-dark: #c82769;
  --blue: #315cff;
  --mint: #a8dfc1;
  --amber: #efb24d;
  --display: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  --shadow: 0 28px 70px rgba(17, 19, 24, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(49, 92, 255, 0.48);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(217, 222, 223, 0.82);
  background: rgba(245, 247, 245, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(17, 19, 24, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 64px, 1240px);
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
}

.brand img {
  border-radius: 8px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: 80px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a {
  position: relative;
  padding: 24px 0 22px;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 15px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

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

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease;
}

.github-link:hover {
  border-color: #aeb5b9;
  background: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
  display: none;
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--brand);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.button-secondary:hover {
  border-color: #aeb5b9;
  background: #ffffff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.text-link:hover {
  color: var(--brand-dark);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e5e6;
  background: #f9faf9;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.window-title img {
  border-radius: 5px;
}

.window-status {
  color: #888f96;
  font-family: var(--mono);
  font-size: 10px;
}

.section {
  padding: 128px 32px;
}

.section-kicker {
  margin-bottom: 14px;
}

.site-footer {
  padding: 30px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1240px);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  border-radius: 7px;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-family: var(--display);
  font-size: 15px;
}

.footer-brand span,
.footer-links {
  color: var(--text-muted);
  font-size: 11px;
}

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

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

@media (max-width: 920px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    width: min(100% - 40px, 1240px);
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: max-height 220ms ease, opacity 180ms ease;
  }

  .mobile-nav.is-open {
    max-height: 280px;
    padding-bottom: 18px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-nav a {
    padding: 12px 2px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    font-weight: 650;
  }
}

@media (max-width: 720px) {
  .header-inner {
    width: min(100% - 40px, 1240px);
  }

  .github-link span {
    display: none;
  }

  .github-link {
    padding: 10px;
  }

  .section {
    padding: 88px 20px;
  }

  .site-footer {
    padding: 28px 20px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
