:root {
  --bg: #f9f7f2;
  --text: #171717;
  --muted: #8a8a8a;
  --soft: #f2eee6;
  --border: rgba(0, 0, 0, 0.06);
  --button-bg: rgba(0, 0, 0, 0.03);
  --button-hover: rgba(0, 0, 0, 0.06);
  --icon: #8c8c8c;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  transition: background-color 220ms ease, color 220ms ease;
  overflow-x: hidden;
}

body.dark {
  --bg: #111111;
  --text: #f3f3f0;
  --muted: #a1a1aa;
  --soft: #18181b;
  --border: rgba(255, 255, 255, 0.08);
  --button-bg: rgba(255, 255, 255, 0.04);
  --button-hover: rgba(255, 255, 255, 0.08);
  --icon: #d4d4d8;
}

.page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.site-header {
  width: 100%;
  padding: clamp(20px, 4vw, 28px) clamp(20px, 5vw, 32px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  row-gap: 12px;
  flex-wrap: wrap;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 10px;
  transition: color 180ms ease;
}

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

.theme-toggle {
  margin-left: 4px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  opacity: 0.85;
  transition: opacity 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  opacity: 1;
  background-color: var(--button-bg);
}

.nav .theme-toggle {
  margin-left: auto;
}

.theme-toggle .icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--icon);
  transition: color 180ms ease;
}

.theme-toggle:hover .icon {
  color: var(--text);
}

.site-main {
  width: 100%;
  padding: clamp(16px, 4vw, 28px) clamp(20px, 5vw, 32px) 64px;
  flex: 1;
  display: flex;
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6vh;
}

.hero-body {
  max-width: 760px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

h1 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.lede {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
}

.site-footer {
  width: 100%;
  padding: 0 clamp(20px, 5vw, 32px) 20px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: clamp(14px, 4vw, 24px);
  bottom: clamp(14px, 4vw, 24px);
  border: none;
  background: var(--button-bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  color: var(--icon);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
  color: var(--text);
  background: var(--button-hover);
}

.scroll-top svg {
  display: block;
}

@media (max-width: 720px) {
  .site-header,
  .site-main,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-main {
    padding-top: 16px;
    padding-bottom: 48px;
  }

  .hero {
    min-height: auto;
    padding-top: 5vh;
  }

  .hero-body {
    padding: 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 8px;
  }

  h1 {
    font-size: clamp(32px, 8vw, 44px);
  }

  .lede {
    font-size: 16px;
    line-height: 1.6;
  }
}
